Skip to content

Commit

Permalink
Don't resolve the Deprecation error handler mode until a deprecation …
Browse files Browse the repository at this point in the history
…is triggered
  • Loading branch information
ossinkine committed Feb 14, 2019
1 parent 37b0eeb commit bb9abcf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
Expand Up @@ -105,8 +105,7 @@ public static function register($mode = 0)
'remaining vendor' => array(),
);
$deprecationHandler = function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, $getMode, $UtilPrefix, $inVendors) {
$mode = $getMode();
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === $mode) {
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === ($mode = $getMode())) {
$ErrorHandler = $UtilPrefix.'ErrorHandler';

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

0 comments on commit bb9abcf

Please sign in to comment.