diff --git a/src/Registry.php b/src/Registry.php index de9400d..44242c0 100644 --- a/src/Registry.php +++ b/src/Registry.php @@ -305,7 +305,8 @@ public static function errorHandler(int $code, string $message, string $file, in public static function fatalErrorHandler(): void { - $error = \error_get_last(); + // !Warning! You should not call error_get_last in root namespace! + $error = error_get_last(); if (!\is_array($error) || !\in_array($error['type'], self::$FATAL)) { return;