8000 bug #30490 Don't resolve the Deprecation error handler mode until a d… · deviantintegral/symfony@bfcc607 · GitHub
[go: up one dir, main page]

Skip to content

Commit bfcc607

Browse files
bug symfony#30490 Don't resolve the Deprecation error handler mode until a deprecation is triggered (Emmanuel BORGES)
This PR was squashed before being merged into the 4.2 branch (closes symfony#30490). Discussion ---------- Don't resolve the Deprecation error handler mode until a deprecation is triggered | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#30047 | License | MIT Don't resolve the Deprecation error handler mode until a deprecation is triggered Commits ------- f3a5b74 Don't resolve the Deprecation error handler mode until a deprecation is triggered
2 parents eb2972e + f3a5b74 commit bfcc607

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ public static function register($mode = 0)
105105
'remaining vendor' => array(),
106106
];
107107
$deprecationHandler = function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, $getMode, $UtilPrefix, $inVendors) {
108-
$mode = $getMode();
109-
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === $mode) {
108+
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) {
110109
$ErrorHandler = $UtilPrefix.'ErrorHandler';
111110

112111
return $ErrorHandler::handleError($type, $msg, $file, $line, $context);

0 commit comments

Comments
 (0)
0