mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix issue "Debugger class not found"
App::uses('Debugger') not needed because it's allready defined in top of file
This commit is contained in:
parent
a4a63bfabd
commit
5a7507df4f
1 changed files with 10 additions and 0 deletions
|
@ -230,6 +230,16 @@ class ErrorHandler {
|
||||||
}
|
}
|
||||||
$message = $error . ' (' . $code . '): ' . $description . ' in [' . $file . ', line ' . $line . ']';
|
$message = $error . ' (' . $code . '): ' . $description . ' in [' . $file . ', line ' . $line . ']';
|
||||||
if (!empty($errorConfig['trace'])) {
|
if (!empty($errorConfig['trace'])) {
|
||||||
|
// https://bugs.php.net/bug.php?id=65322
|
||||||
|
if (version_compare(PHP_VERSION, '5.4.21', '<')) {
|
||||||
|
if (!class_exists('Debugger')) {
|
||||||
|
App::load('Debugger');
|
||||||
|
}
|
||||||
|
if (!class_exists('CakeText')) {
|
||||||
|
App::uses('CakeText', 'Utility');
|
||||||
|
App::load('CakeText');
|
||||||
|
}
|
||||||
|
}
|
||||||
$trace = Debugger::trace(array('start' => 1, 'format' => 'log'));
|
$trace = Debugger::trace(array('start' => 1, 'format' => 'log'));
|
||||||
$message .= "\nTrace:\n" . $trace . "\n";
|
$message .= "\nTrace:\n" . $trace . "\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue