From fe6958d54f0b82a9dfd678005561d729f1ffcd44 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 6 Dec 2009 02:30:24 +0000 Subject: [PATCH] PHP 5.3 compatibility: Disable E_DEPRECATED on startup to keep set_magic_quotes_runtime(0) quiet. [Bug #54495] git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10299 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/common.php | 8 ++++++-- phpBB/docs/CHANGELOG.html | 1 + phpBB/install/database_update.php | 8 ++++++-- phpBB/install/index.php | 8 ++++++-- phpBB/style.php | 8 ++++++-- 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/phpBB/common.php b/phpBB/common.php index 087eaeef83..9b6913e95f 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -19,8 +19,12 @@ if (!defined('IN_PHPBB')) $starttime = explode(' ', microtime()); $starttime = $starttime[1] + $starttime[0]; -// Report all errors, except notices -error_reporting(E_ALL ^ E_NOTICE); +// Report all errors, except notices and deprecation messages +if (!defined('E_DEPRECATED')) +{ + define('E_DEPRECATED', 8192); +} +error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED); /* * Remove variables created by register_globals from the global scope diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index bf33194748..d8858f9970 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -102,6 +102,7 @@
  • [Fix] Correctly show topic ATOM feed link when only post id is specified. (Bug #53025)
  • [Fix] Cleanly handle forum/topic not found in ATOM Feeds. (Bug #54295)
  • [Fix] PHP 5.3 compatibility: Check if function dl() exists before calling it. (Bug #54665)
  • +
  • [Fix] PHP 5.3 compatibility: Disable E_DEPRECATED on startup to keep set_magic_quotes_runtime(0) quiet. (Bug #54495)
  • [Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)
  • [Change] Use em dash instead of hyphen/minus as separator in ATOM Feeds item statistics. (Bug #53565)
  • diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index b7cfdd36b9..bf9c183e0c 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -30,8 +30,12 @@ define('IN_INSTALL', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); -// Report all errors, except notices -//error_reporting(E_ALL ^ E_NOTICE); +// Report all errors, except notices and deprecation messages +if (!defined('E_DEPRECATED')) +{ + define('E_DEPRECATED', 8192); +} +//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 47f1787030..eb51ca5fb2 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -18,8 +18,12 @@ define('IN_INSTALL', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); -// Report all errors, except notices -error_reporting(E_ALL ^ E_NOTICE); +// Report all errors, except notices and deprecation messages +if (!defined('E_DEPRECATED')) +{ + define('E_DEPRECATED', 8192); +} +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 64241f7ed3..fa77815670 100644 --- a/phpBB/style.php +++ b/phpBB/style.php @@ -15,8 +15,12 @@ define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); -// Report all errors, except notices -error_reporting(E_ALL ^ E_NOTICE); +// Report all errors, except notices and deprecation messages +if (!defined('E_DEPRECATED')) +{ + define('E_DEPRECATED', 8192); +} +error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED); require($phpbb_root_path . 'config.' . $phpEx);