From 1b07986f3ac09caf65c3d621ce3547271560aef2 Mon Sep 17 00:00:00 2001 From: Edmond <1571649+EdmondDantes@users.noreply.github.com> Date: Sat, 26 Oct 2024 20:10:38 +0300 Subject: [PATCH] * fix tests --- src/Registry.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;