From 849e781208fbc1a0b877ba80a511aebfd2aaa82c Mon Sep 17 00:00:00 2001 From: Alexander Nell Date: Thu, 27 Feb 2020 00:41:01 +0100 Subject: [PATCH] Solve non-numeric warning on self-triggered debug notice --- core/ErrorHandler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/ErrorHandler.php b/core/ErrorHandler.php index 88edd08c..611dd772 100644 --- a/core/ErrorHandler.php +++ b/core/ErrorHandler.php @@ -253,8 +253,8 @@ class ErrorHandler { * @return bool */ private static function isUserErrorNumber($errorNumber) { - return ($errorNumber & E_USER_ERROR || $errorNumber & E_USER_WARNING || $errorNumber & E_USER_NOTICE - || $errorNumber & E_USER_DEPRECATED); + $userError = (E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_USER_DEPRECATED); + return is_int($errorNumber) && ($errorNumber & $userError); } /** @@ -265,7 +265,7 @@ class ErrorHandler { */ public static function isFatalError($errorNumber) { $fatalError = (E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR); - return ($errorNumber & $fatalError); + return is_int($errorNumber) && ($errorNumber & $fatalError); } /**