From 5a4a1e3c25b0e10a3ce008dc2eded29decb0f469 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 11 May 2011 03:51:34 +0200 Subject: [PATCH] [ticket/10126] Use binary "and not" instead of binary "xor" in error_reporting. Make what we want to achieve clear by using "and not" instead of "xor". PHPBB3-10126 --- phpBB/common.php | 2 +- phpBB/download/file.php | 2 +- phpBB/install/database_update.php | 2 +- phpBB/install/index.php | 2 +- phpBB/style.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/common.php b/phpBB/common.php index ae174c8441..ceafdbd3bd 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -24,7 +24,7 @@ if (!defined('E_DEPRECATED')) { define('E_DEPRECATED', 8192); } -error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED); +error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); /* * Remove variables created by register_globals from the global scope diff --git a/phpBB/download/file.php b/phpBB/download/file.php index e1ec835b9b..ed5c4f55b8 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -35,7 +35,7 @@ if (isset($_GET['avatar'])) { define('E_DEPRECATED', 8192); } - error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED); + error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); require($phpbb_root_path . 'config.' . $phpEx); diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 01048520d2..3d32a82cc6 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -35,7 +35,7 @@ if (!defined('E_DEPRECATED')) { define('E_DEPRECATED', 8192); } -//error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED); +//error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); error_reporting(E_ALL); @set_time_limit(0); diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 49c99da0d7..bace22f177 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -23,7 +23,7 @@ if (!defined('E_DEPRECATED')) { define('E_DEPRECATED', 8192); } -error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED); +error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); // @todo Review this test and see if we can find out what it is which prevents PHP 4.2.x from even displaying the page with requirements on it if (version_compare(PHP_VERSION, '4.3.3') < 0) diff --git a/phpBB/style.php b/phpBB/style.php index 8ca1751391..f3e1b4c89e 100644 --- a/phpBB/style.php +++ b/phpBB/style.php @@ -20,7 +20,7 @@ if (!defined('E_DEPRECATED')) { define('E_DEPRECATED', 8192); } -error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED); +error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); require($phpbb_root_path . 'config.' . $phpEx);