chg: [error handler] changed to conform with 4.4

cli-modification-summary
iglocska 2022-08-17 13:46:59 +02:00
parent a8c42969ab
commit 6bd9d7d2f0
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 4 additions and 4 deletions

View File

@ -35,8 +35,8 @@ use Cake\Cache\Cache;
use Cake\Core\Configure;
use Cake\Core\Configure\Engine\PhpConfig;
use Cake\Datasource\ConnectionManager;
use Cake\Error\ConsoleErrorHandler;
use Cake\Error\ErrorHandler;
use Cake\Error\ErrorTrap;
use Cake\Error\ExceptionTrap;
use Cake\Filesystem\File;
use Cake\Http\ServerRequest;
use Cake\Log\Log;
@ -132,9 +132,9 @@ ini_set('intl.default_locale', Configure::read('App.defaultLocale'));
*/
$isCli = PHP_SAPI === 'cli';
if ($isCli) {
(new ConsoleErrorHandler(Configure::read('Error')))->register();
(new ErrorTrap(Configure::read('Error')))->register();
} else {
(new ErrorHandler(Configure::read('Error')))->register();
(new ExceptionTrap(Configure::read('Error')))->register();
}
/*