diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php index baedeca346..650c8a1543 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php @@ -60,7 +60,9 @@ class Deprecation $line = $trace[$i]; $this->triggeringFile = $file; if (isset($line['object']) || isset($line['class'])) { + set_error_handler(function () {}); $parsedMsg = @unserialize($this->message); + restore_error_handler(); if ($parsedMsg && isset($parsedMsg['deprecation'])) { $this->message = $parsedMsg['deprecation']; $this->originClass = $parsedMsg['class'];