Skip to content

Commit

Permalink
Making ConsoleErrorHandler be invoked with the correct error reportin…
Browse files Browse the repository at this point in the history
…g level.
  • Loading branch information
markstory committed Nov 29, 2010
1 parent 284a8db commit 91b5a52
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions cake/console/libs/console_error_handler.php
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion cake/console/shell_dispatcher.php
Expand Up @@ -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', '/');
Expand Down

0 comments on commit 91b5a52

Please sign in to comment.