summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-05 15:47:59 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-05 15:47:59 +0200
commit489cf769f2f7a4ffe0362e44bc83fdec14c3ac13 (patch)
tree54d978c06d0dd8d23067aa781850c6c674074a5b
parent6123b61e8ec95ac91f67bfbf442e34021c922319 (diff)
parent312bdc5e2160784c7fdd0f38c6d417a9eb5babe0 (diff)
Merge pull request #1682 from dhinus/patch-1
Logging should obey error_reporting() setting
-rw-r--r--system/core/Common.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index e449dd2e0..981af4559 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -520,18 +520,17 @@ if ( ! function_exists('_exception_handler'))
{
$_error =& load_class('Exceptions', 'core');
- // Should we display the error? We'll get the current error_reporting
+ // Should we ignore the error? We'll get the current error_reporting
// level and add its bits with the severity bits to find out.
- // And respect display_errors
- if (($severity & error_reporting()) === $severity && (bool) ini_get('display_errors') === TRUE)
+ if (($severity & error_reporting()) !== $severity)
{
- $_error->show_php_error($severity, $message, $filepath, $line);
+ return;
}
- // Should we log the error? No? We're done...
- if (config_item('log_threshold') === 0)
+ // Should we display the error?
+ if ((bool) ini_get('display_errors') === TRUE)
{
- return;
+ $_error->show_php_error($severity, $message, $filepath, $line);
}
$_error->log_exception($severity, $message, $filepath, $line);