diff --git a/src/Flare.php b/src/Flare.php index 11be368..de1b377 100755 --- a/src/Flare.php +++ b/src/Flare.php @@ -216,9 +216,11 @@ public function registerExceptionHandler(): self return $this; } - public function registerErrorHandler(int $errorLevels = E_ALL | E_STRICT): self + public function registerErrorHandler(?int $errorLevels = null): self { - $this->previousErrorHandler = set_error_handler([$this, 'handleError'], $errorLevels); + $this->previousErrorHandler = $errorLevels + ? set_error_handler([$this, 'handleError'], $errorLevels) + : set_error_handler([$this, 'handleError']); return $this; }