Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3a5b74

Browse files
Emmanuel BORGESnicolas-grekas
Emmanuel BORGES
authored andcommitted
Don't resolve the Deprecation error handler mode until a deprecation is triggered
1 parent eb2972e commit f3a5b74

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)