aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-05-05 12:28:38 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-05-05 12:28:38 +0000
commit8f765e50a39d79ff23d812fd3a88937f988a75ca (patch)
treeacb2f0b859b7719ed88dbe311777199ad4d63280 /phpBB/includes
parentb5608afe0331a38c7761558a20337814f43bb162 (diff)
downloadforums-8f765e50a39d79ff23d812fd3a88937f988a75ca.tar
forums-8f765e50a39d79ff23d812fd3a88937f988a75ca.tar.gz
forums-8f765e50a39d79ff23d812fd3a88937f988a75ca.tar.bz2
forums-8f765e50a39d79ff23d812fd3a88937f988a75ca.tar.xz
forums-8f765e50a39d79ff23d812fd3a88937f988a75ca.zip
- put the error reporting check into another location (since we do want to display our notices. ;))
- default error reporting in common.php - E_ALL being set if DEBUG_EXTRA defined git-svn-id: file:///svn/phpbb/trunk@5882 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index fd658bb0c4..eae12f3d07 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2152,13 +2152,6 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
global $cache, $db, $auth, $template, $config, $user;
global $phpEx, $phpbb_root_path, $starttime, $msg_title, $msg_long_text;
- // Check the error reporting level and return if the error level does not match
- // This also fixes the displayed notices even if we suppress them via @
- if (($errno & error_reporting()) == 0)
- {
- return;
- }
-
// Message handler is stripping text. In case we need it, we are possible to define long text...
if (isset($msg_long_text) && $msg_long_text && !$msg_text)
{
@@ -2170,14 +2163,22 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
case E_NOTICE:
case E_WARNING:
+ // Check the error reporting level and return if the error level does not match
+ // Additionally do not display notices if we suppress them via @
+ // If DEBUG_EXTRA is defined the default level is E_ALL
+ if (($errno & ((defined('DEBUG_EXTRA') && error_reporting()) ? E_ALL : error_reporting())) == 0)
+ {
+ return;
+ }
+
/**
* @todo Think about removing the if-condition within the final product, since we no longer enable DEBUG by default and we will maybe adjust the error reporting level
*/
if (defined('DEBUG'))
{
- if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.php') === false)
+ if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false)
{
- echo '<b>[phpBB Debug Extra] PHP Notice</b>: in file <b>' . str_replace(array(realpath($phpbb_root_path), '\\'), array('', '/'), $errfile) . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n";
+ echo '<b>[phpBB Debug] PHP Notice</b>: in file <b>' . str_replace(array(realpath($phpbb_root_path), '\\'), array('', '/'), $errfile) . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n";
}
}