mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix Debugger error output in CLI when Debugger is used as the error handler.
Merge changes from #6803 into 2.6.
This commit is contained in:
commit
bf82c95d64
2 changed files with 8 additions and 0 deletions
|
@ -177,6 +177,9 @@ class ShellDispatcher {
|
|||
}
|
||||
set_exception_handler($exception['consoleHandler']);
|
||||
set_error_handler($error['consoleHandler'], Configure::read('Error.level'));
|
||||
|
||||
App::uses('Debugger', 'Utility');
|
||||
Debugger::getInstance()->output('txt');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
App::uses('ErrorHandler', 'Error');
|
||||
App::uses('Controller', 'Controller');
|
||||
App::uses('Router', 'Routing');
|
||||
App::uses('Debugger', 'Utility');
|
||||
|
||||
/**
|
||||
* A faulty ExceptionRenderer to test nesting.
|
||||
|
@ -92,6 +93,8 @@ class ErrorHandlerTest extends CakeTestCase {
|
|||
set_error_handler('ErrorHandler::handleError');
|
||||
$this->_restoreError = true;
|
||||
|
||||
Debugger::getInstance()->output('html');
|
||||
|
||||
ob_start();
|
||||
$wrong .= '';
|
||||
$result = ob_get_clean();
|
||||
|
@ -123,6 +126,8 @@ class ErrorHandlerTest extends CakeTestCase {
|
|||
set_error_handler('ErrorHandler::handleError');
|
||||
$this->_restoreError = true;
|
||||
|
||||
Debugger::getInstance()->output('html');
|
||||
|
||||
ob_start();
|
||||
trigger_error('Test error', $error);
|
||||
|
||||
|
|
Loading…
Reference in a new issue