Skip to content
Permalink
Browse files

Making ConsoleErrorHandler be invoked with the correct error reportin…

…g level.
  • Loading branch information...
markstory committed Nov 29, 2010
1 parent 284a8db commit 91b5a5265e017bd27d7a8186d8fa2c571133336d
Showing with 1 addition and 5 deletions.
  1. +0 −4 cake/console/libs/console_error_handler.php
  2. +1 −1 cake/console/shell_dispatcher.php
@@ -70,10 +70,6 @@ public static function handleException($exception) {
* @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 @@ function __bootstrap() {
}
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', '/');

0 comments on commit 91b5a52

Please sign in to comment.
You can’t perform that action at this time.