From 123cf8d43743d14facfee5d827500d2c863799cc Mon Sep 17 00:00:00 2001 From: Hide_D Date: Mon, 9 May 2022 16:08:53 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20error=20logger=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f_config/config.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/f_config/config.php b/f_config/config.php index bb4ffe8a..b9c09f2e 100644 --- a/f_config/config.php +++ b/f_config/config.php @@ -133,6 +133,7 @@ function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, in $errfile . ':' . $errline, getExceptionTraceAsString($e) ); + return true; } set_error_handler("\\sammo\\logErrorByCustomHandler"); @@ -155,7 +156,10 @@ set_exception_handler('\\sammo\\logExceptionByCustomHandler'); function checkForFatal() { $error = error_get_last(); - if ($error["type"] == E_ERROR) { + if($error === null){ + return; + } + if (($error["type"]??0) == E_ERROR) { logErrorByCustomHandler($error["type"], $error["message"], $error["file"], $error["line"]); } }