mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Making ConsoleErrorHandler be invoked with the correct error reporting level.
This commit is contained in:
parent
284a8db3f4
commit
91b5a5265e
2 changed files with 1 additions and 5 deletions
|
@ -70,10 +70,6 @@ class ConsoleErrorHandler extends ErrorHandler {
|
|||
* @return void
|
||||
*/
|
||||
public static function handleError($code, $description, $file = null, $line = null, $context = null) {
|
||||
$errorConfig = Configure::read('Error');
|
||||
if (isset($errorConfig['level']) && ($code & ~$errorConfig['level'])) {
|
||||
return;
|
||||
}
|
||||
$stderr = self::getStderr();
|
||||
list($name, $log) = self::_mapErrorCode($code);
|
||||
$message = sprintf(__('%s in [%s, line %s]'), $description, $file, $line);
|
||||
|
|
|
@ -145,7 +145,7 @@ class ShellDispatcher {
|
|||
}
|
||||
require_once CONSOLE_LIBS . 'console_error_handler.php';
|
||||
set_exception_handler(array('ConsoleErrorHandler', 'handleException'));
|
||||
set_error_handler(array('ConsoleErrorHandler', 'handleError'));
|
||||
set_error_handler(array('ConsoleErrorHandler', 'handleError'), Configure::read('Error.level'));
|
||||
|
||||
if (!defined('FULL_BASE_URL')) {
|
||||
define('FULL_BASE_URL', '/');
|
||||
|
|
Loading…
Reference in a new issue