Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Commit

Permalink
Workaround disabled "var_dump"
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jul 27, 2022
1 parent 77603ba commit 60d1b67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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();
}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 60d1b67

Please sign in to comment.