Solve non-numeric warning on self-triggered debug notice

This commit is contained in:
Alexander Nell 2020-02-27 00:41:01 +01:00
parent ef5fdcc53c
commit 849e781208

View File

@ -253,8 +253,8 @@ class ErrorHandler {
* @return bool * @return bool
*/ */
private static function isUserErrorNumber($errorNumber) { private static function isUserErrorNumber($errorNumber) {
return ($errorNumber & E_USER_ERROR || $errorNumber & E_USER_WARNING || $errorNumber & E_USER_NOTICE $userError = (E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_USER_DEPRECATED);
|| $errorNumber & E_USER_DEPRECATED); return is_int($errorNumber) && ($errorNumber & $userError);
} }
/** /**
@ -265,7 +265,7 @@ class ErrorHandler {
*/ */
public static function isFatalError($errorNumber) { public static function isFatalError($errorNumber) {
$fatalError = (E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR); $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);
} }
/** /**