Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0e2d5e9

Browse filesBrowse files
bug #36172 [Debug] fix for PHP 7.3.16+/7.4.4+ (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [Debug] fix for PHP 7.3.16+/7.4.4+ | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Should make tests green. Follows php/php-src#5206, which is part of PHP 7.4.4 and 7.3.16. The same patch is needed on the ErrorHandler component in 4.4 of course. Commits ------- b3d9a8a [Debug] fix for PHP 7.3.16+/7.4.4+
2 parents e3cc3bd + b3d9a8a commit 0e2d5e9
Copy full SHA for 0e2d5e9

File tree

Expand file treeCollapse file tree

2 files changed

+2
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-4
lines changed

‎src/Symfony/Component/Debug/ErrorHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/ErrorHandler.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ public function handleError($type, $message, $file, $line)
521521
$errorAsException ? ['exception' => $errorAsException] : [],
522522
];
523523
} else {
524-
if (!\defined('HHVM_VERSION')) {
524+
if (\PHP_VERSION_ID < (\PHP_VERSION_ID < 70400 ? 70316 : 70404) && !\defined('HHVM_VERSION')) {
525525
$currentErrorHandler = set_error_handler('var_dump');
526526
restore_error_handler();
527527
}
@@ -533,7 +533,7 @@ public function handleError($type, $message, $file, $line)
533533
} finally {
534534
$this->isRecursive = false;
535535

536-
if (!\defined('HHVM_VERSION')) {
536+
if (\PHP_VERSION_ID < (\PHP_VERSION_ID < 70400 ? 70316 : 70404) && !\defined('HHVM_VERSION')) {
537537
set_error_handler($currentErrorHandler);
538538
}
539539
}

‎src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,6 @@ public function testHandleDeprecation()
327327
$handler = new ErrorHandler();
328328
$handler->setDefaultLogger($logger);
329329
@$handler->handleError(E_USER_DEPRECATED, 'Foo deprecation', __FILE__, __LINE__, []);
330-
331-
restore_error_handler();
332330
}
333331

334332
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.