mirror of
https://github.com/filp/whoops.git
synced 2026-09-16 12:46:19 +00:00
Changed the way isLevelFatal is made. Now using bitwise AND instead of
checking the presence in a predefined array.
This commit is contained in:
+7
-11
@@ -377,16 +377,12 @@ class Run
|
||||
|
||||
private static function isLevelFatal($level)
|
||||
{
|
||||
return in_array(
|
||||
$level,
|
||||
array(
|
||||
E_ERROR,
|
||||
E_PARSE,
|
||||
E_CORE_ERROR,
|
||||
E_CORE_WARNING,
|
||||
E_COMPILE_ERROR,
|
||||
E_COMPILE_WARNING
|
||||
)
|
||||
);
|
||||
$errors = E_ERROR
|
||||
| E_PARSE
|
||||
| E_CORE_ERROR
|
||||
| E_CORE_WARNING
|
||||
| E_COMPILE_ERROR
|
||||
| E_COMPILE_WARNING;
|
||||
return $level & $errors;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user