From 5a7507df4fd08bac5af84be921ffb4ae4b6d8c92 Mon Sep 17 00:00:00 2001 From: Sander Visser Date: Fri, 11 Sep 2015 15:23:21 +0200 Subject: [PATCH] Fix issue "Debugger class not found" App::uses('Debugger') not needed because it's allready defined in top of file --- lib/Cake/Error/ErrorHandler.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Cake/Error/ErrorHandler.php b/lib/Cake/Error/ErrorHandler.php index 2cce57689..3192ed5f8 100644 --- a/lib/Cake/Error/ErrorHandler.php +++ b/lib/Cake/Error/ErrorHandler.php @@ -230,6 +230,16 @@ class ErrorHandler { } $message = $error . ' (' . $code . '): ' . $description . ' in [' . $file . ', line ' . $line . ']'; 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')); $message .= "\nTrace:\n" . $trace . "\n"; }