diff --git a/cake/libs/configure.php b/cake/libs/configure.php index bd88c5a18e3..34b6bbc522e 100644 --- a/cake/libs/configure.php +++ b/cake/libs/configure.php @@ -102,12 +102,13 @@ public static function bootstrap($boot = true) { if (!include(CONFIGS . 'bootstrap.php')) { trigger_error(sprintf(__("Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP."), CONFIGS), E_USER_ERROR); } - - if (!empty(self::$_values['Error']['handler'])) { - set_error_handler(self::$_values['Error']['handler']); - } + $level = -1; if (isset(self::$_values['Error']['level'])) { error_reporting(self::$_values['Error']['level']); + $level = self::$_values['Error']['level']; + } + if (!empty(self::$_values['Error']['handler'])) { + set_error_handler(self::$_values['Error']['handler'], $level); } if (!empty(self::$_values['Exception']['handler'])) { set_exception_handler(self::$_values['Exception']['handler']); diff --git a/cake/libs/error_handler.php b/cake/libs/error_handler.php index 48f06c1fd00..2b9731d1ade 100644 --- a/cake/libs/error_handler.php +++ b/cake/libs/error_handler.php @@ -134,9 +134,6 @@ public static function handleException(Exception $exception) { */ public static function handleError($code, $description, $file = null, $line = null, $context = null) { $errorConfig = Configure::read('Error'); - if (isset($errorConfig['level']) && ($code & ~$errorConfig['level'])) { - return; - } list($error, $log) = self::_mapErrorCode($code); $debug = Configure::read('debug');