From c4cc3927c39f62fb27e62b444b142aef0cd9465c Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Fri, 28 Oct 2016 09:07:59 +0200 Subject: [PATCH] [PhpUnitBridge] Fix undefined variable Otherwise `$mode` is not defined on line 115 --- src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index cdf36b479dbba..0d4deb9a9bdcb 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -68,7 +68,8 @@ public static function register($mode = 0) 'other' => array(), ); $deprecationHandler = function ($type, $msg, $file, $line, $context) use (&$deprecations, $getMode) { - if (E_USER_DEPRECATED !== $type || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) { + $mode = $getMode(); + if (E_USER_DEPRECATED !== $type || DeprecationErrorHandler::MODE_DISABLED === $mode) { return \PHPUnit_Util_ErrorHandler::handleError($type, $msg, $file, $line, $context); }