Skip to content
Permalink
Browse files

Removing error masking in ErrorHandler, instead correctly calling set…

…_error_handler() works better.
  • Loading branch information...
markstory committed Nov 27, 2010
1 parent c717ff2 commit d3f0d25c030ad5affe1d5c560a8d4ee2098f86a5
Showing with 5 additions and 7 deletions.
  1. +5 −4 cake/libs/configure.php
  2. +0 −3 cake/libs/error_handler.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']);
@@ -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');

0 comments on commit d3f0d25

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