Fix phpunit bridge

This commit is contained in:
Nicolas Grekas 2017-10-25 11:55:09 +02:00
parent 7e6e2f07e2
commit 3e3e74c3fa

View File

@ -254,8 +254,10 @@ class DeprecationErrorHandler
if ($previousErrorHandler) {
return $previousErrorHandler($type, $msg, $file, $line, $context);
}
static $autoload = true;
$ErrorHandler = class_exists('PHPUnit_Util_ErrorHandler', false) ? 'PHPUnit_Util_ErrorHandler' : 'PHPUnit\Util\ErrorHandler';
$ErrorHandler = class_exists('PHPUnit_Util_ErrorHandler', $autoload) ? 'PHPUnit_Util_ErrorHandler' : 'PHPUnit\Util\ErrorHandler';
$autoload = false;
return $ErrorHandler::handleError($type, $msg, $file, $line, $context);
}