diff options
author | Andreas Fischer <bantu@phpbb.com> | 2011-06-20 00:03:20 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-06-20 00:03:20 +0200 |
commit | 8c01ed578da2a501b9ad1fc8541e3eb237d1b765 (patch) | |
tree | f6d42f50b111849faa91af9091ccb44bc498390d /phpBB/includes/functions.php | |
parent | 6a4ca8cad9bc6602ec3a5b0041cf619fc8aebaff (diff) | |
download | forums-8c01ed578da2a501b9ad1fc8541e3eb237d1b765.tar forums-8c01ed578da2a501b9ad1fc8541e3eb237d1b765.tar.gz forums-8c01ed578da2a501b9ad1fc8541e3eb237d1b765.tar.bz2 forums-8c01ed578da2a501b9ad1fc8541e3eb237d1b765.tar.xz forums-8c01ed578da2a501b9ad1fc8541e3eb237d1b765.zip |
[ticket/10234] Report E_WARNING errors as "PHP Warning" instead of "PHP Notice"
PHPBB3-10234
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index b8d9e0b92e..a89b47b170 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3776,7 +3776,8 @@ function msg_handler($errno, $msg_text, $errfile, $errline) // remove complete path to installation, with the risk of changing backslashes meant to be there $errfile = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $errfile); $msg_text = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $msg_text); - echo '<b>[phpBB Debug] PHP Notice</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n"; + $error_name = ($errno === E_WARNING) ? 'PHP Warning' : 'PHP Notice'; + echo '<b>[phpBB Debug] ' . $error_name . '</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n"; // we are writing an image - the user won't see the debug, so let's place it in the log if (defined('IMAGE_OUTPUT') || defined('IN_CRON')) |