mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix fatal error when E_STRICT is enabled.
If you have E_STRICT enabled and have a strict error in your files, you would see a fatal error related to Debugger missing. PHP won't autoload classes if you are currently in an autoload call, and an error is triggered. Preloading Debugger + String in dev mode lets you see the correct error.
This commit is contained in:
parent
db7d5426ec
commit
35e0984bec
1 changed files with 6 additions and 1 deletions
|
@ -98,7 +98,12 @@ class Configure {
|
||||||
self::$_values['Error'],
|
self::$_values['Error'],
|
||||||
self::$_values['Exception']
|
self::$_values['Exception']
|
||||||
);
|
);
|
||||||
unset($error, $exception);
|
|
||||||
|
// Preload Debugger + String in case of E_STRICT errors when loading files.
|
||||||
|
if (self::$_values['debug'] > 0) {
|
||||||
|
class_exists('Debugger');
|
||||||
|
class_exists('String');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue