mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Merge pull request #7673 from cakephp/issue-7661
In CLI mode default the error handlers to Console flavors.
This commit is contained in:
commit
65b84107a1
1 changed files with 6 additions and 0 deletions
|
@ -87,6 +87,12 @@ class Configure {
|
|||
'handler' => 'ErrorHandler::handleError',
|
||||
'level' => E_ALL & ~E_DEPRECATED,
|
||||
);
|
||||
if (PHP_SAPI === 'cli') {
|
||||
App::uses('ConsoleErrorHandler', 'Console');
|
||||
$console = new ConsoleErrorHandler();
|
||||
$exception['handler'] = array($console, 'handleException');
|
||||
$error['handler'] = array($console, 'handleError');
|
||||
}
|
||||
static::_setErrorHandlers($error, $exception);
|
||||
|
||||
if (!include APP . 'Config' . DS . 'bootstrap.php') {
|
||||
|
|
Loading…
Add table
Reference in a new issue