make use of str_starts_with / str_ends_with / str_contains
This commit is contained in:
@ -42,7 +42,7 @@ ini_set('assert.exception', '1'); // throw exceptions when failed
|
||||
set_error_handler(function ($errNo, $errStr) {
|
||||
// Should we turn ALL notices into errors? PHP allows a lot of
|
||||
// terrible things to happen by default...
|
||||
if (strpos($errStr, 'Use of undefined constant ') === 0) {
|
||||
if (str_starts_with($errStr, 'Use of undefined constant ')) {
|
||||
throw new Exception("PHP Error#$errNo: $errStr");
|
||||
} else {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user