- add error_reporting to style.php (merge from r8464)

- let the error handler deal with E_STRICT (same as E_WARNING/E_NOTICE) and E_RECOVERABLE_ERROR (same as E_USER_ERROR)


git-svn-id: file:///svn/phpbb/trunk@8466 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann 2008-03-24 00:59:39 +00:00
parent 65b0f6b165
commit 5417ec5c4d
3 changed files with 7 additions and 2 deletions

View file

@ -21,7 +21,6 @@ $starttime = $starttime[1] + $starttime[0];
// Report all errors, except notices // Report all errors, except notices
error_reporting(E_ALL ^ E_NOTICE); error_reporting(E_ALL ^ E_NOTICE);
//error_reporting(E_ALL | E_STRICT);
/* /*
* Remove variables created by register_globals from the global scope * Remove variables created by register_globals from the global scope

View file

@ -2817,10 +2817,11 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
{ {
case E_NOTICE: case E_NOTICE:
case E_WARNING: case E_WARNING:
case E_STRICT:
// Check the error reporting level and return if the error level does not match // Check the error reporting level and return if the error level does not match
// If DEBUG is defined the default level is E_ALL // If DEBUG is defined the default level is E_ALL
if (($errno & ((defined('DEBUG')) ? E_ALL : error_reporting())) == 0) if (($errno & ((defined('DEBUG')) ? E_ALL | E_STRICT : error_reporting())) == 0)
{ {
return; return;
} }
@ -2847,6 +2848,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
break; break;
case E_RECOVERABLE_ERROR:
case E_USER_ERROR: case E_USER_ERROR:
if (!empty($user) && !empty($user->lang)) if (!empty($user) && !empty($user->lang))

View file

@ -14,6 +14,10 @@
define('IN_PHPBB', true); define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1); $phpEx = substr(strrchr(__FILE__, '.'), 1);
// Report all errors, except notices
error_reporting(E_ALL ^ E_NOTICE);
require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'config.' . $phpEx);
if (version_compare(PHP_VERSION, '6.0.0-dev', '<')) if (version_compare(PHP_VERSION, '6.0.0-dev', '<'))