From 60d1b678b7eccfde2415316e62fc689f932fe82b Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 27 Jul 2022 18:05:11 +0200 Subject: [PATCH] Workaround disabled "var_dump" --- ErrorHandler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ErrorHandler.php b/ErrorHandler.php index 99791f9..67f526d 100644 --- a/ErrorHandler.php +++ b/ErrorHandler.php @@ -355,7 +355,7 @@ public function screamAt($levels, $replace = false) private function reRegister(int $prev) { if ($prev !== $this->thrownErrors | $this->loggedErrors) { - $handler = set_error_handler('var_dump'); + $handler = set_error_handler('is_int'); $handler = \is_array($handler) ? $handler[0] : null; restore_error_handler(); if ($handler === $this) { @@ -490,7 +490,7 @@ public function handleError($type, $message, $file, $line) $log = 0; } else { if (\PHP_VERSION_ID < (\PHP_VERSION_ID < 70400 ? 70316 : 70404)) { - $currentErrorHandler = set_error_handler('var_dump'); + $currentErrorHandler = set_error_handler('is_int'); restore_error_handler(); } @@ -601,7 +601,7 @@ public static function handleFatalError(array $error = null) $sameHandlerLimit = 10; while (!\is_array($handler) || !$handler[0] instanceof self) { - $handler = set_exception_handler('var_dump'); + $handler = set_exception_handler('is_int'); restore_exception_handler(); if (!$handler) {