diff --git a/src/ErrorHandlers/ThrowErrorException.php b/src/ErrorHandlers/ThrowErrorException.php index f9ff9af..271b77b 100644 --- a/src/ErrorHandlers/ThrowErrorException.php +++ b/src/ErrorHandlers/ThrowErrorException.php @@ -52,8 +52,12 @@ class ThrowErrorException * * @throws ErrorException if `error_reporting` is set to report the error */ - public function __invoke(int $errno = E_USER_ERROR, string $errstr = '', ?string $errfile = null, ?int $errline = null): bool - { + public function __invoke( + int $errno = \E_USER_ERROR, + string $errstr = '', + ?string $errfile = null, + ?int $errline = null + ): bool { if ((error_reporting() & $errno) > 0) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } diff --git a/src/ErrorHandlers/TriggerExceptionError.php b/src/ErrorHandlers/TriggerExceptionError.php index feddf1c..16e9527 100644 --- a/src/ErrorHandlers/TriggerExceptionError.php +++ b/src/ErrorHandlers/TriggerExceptionError.php @@ -57,6 +57,6 @@ class TriggerExceptionError $exception->getLine(), $exception->getMessage() ); - trigger_error($message, E_USER_ERROR); + trigger_error($message, \E_USER_ERROR); } }