Skip to content

Commit fe6958d

Browse files
committed
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
1 parent a5c9a2f commit fe6958d

5 files changed

Lines changed: 25 additions & 8 deletions

File tree

phpBB/common.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@
1919
$starttime = explode(' ', microtime());
2020
$starttime = $starttime[1] + $starttime[0];
2121

22-
// Report all errors, except notices
23-
error_reporting(E_ALL ^ E_NOTICE);
22+
// Report all errors, except notices and deprecation messages
23+
if (!defined('E_DEPRECATED'))
24+
{
25+
define('E_DEPRECATED', 8192);
26+
}
27+
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
2428

2529
/*
2630
* Remove variables created by register_globals from the global scope

phpBB/docs/CHANGELOG.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ <h1>Changelog</h1>
102102
<li>[Fix] Correctly show topic ATOM feed link when only post id is specified. (Bug #53025)</li>
103103
<li>[Fix] Cleanly handle forum/topic not found in ATOM Feeds. (Bug #54295)</li>
104104
<li>[Fix] PHP 5.3 compatibility: Check if function dl() exists before calling it. (Bug #54665)</li>
105+
<li>[Fix] PHP 5.3 compatibility: Disable E_DEPRECATED on startup to keep set_magic_quotes_runtime(0) quiet. (Bug #54495)</li>
105106
<li>[Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)</li>
106107
<li>[Change] Use em dash instead of hyphen/minus as separator in ATOM Feeds item statistics. (Bug #53565)</li>
107108
</ul>

phpBB/install/database_update.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@
3030
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
3131
$phpEx = substr(strrchr(__FILE__, '.'), 1);
3232

33-
// Report all errors, except notices
34-
//error_reporting(E_ALL ^ E_NOTICE);
33+
// Report all errors, except notices and deprecation messages
34+
if (!defined('E_DEPRECATED'))
35+
{
36+
define('E_DEPRECATED', 8192);
37+
}
38+
//error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
3539
error_reporting(E_ALL);
3640

3741
@set_time_limit(0);

phpBB/install/index.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@
1818
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
1919
$phpEx = substr(strrchr(__FILE__, '.'), 1);
2020

21-
// Report all errors, except notices
22-
error_reporting(E_ALL ^ E_NOTICE);
21+
// Report all errors, except notices and deprecation messages
22+
if (!defined('E_DEPRECATED'))
23+
{
24+
define('E_DEPRECATED', 8192);
25+
}
26+
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
2327

2428
// @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
2529
if (version_compare(PHP_VERSION, '4.3.3') < 0)

phpBB/style.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@
1515
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
1616
$phpEx = substr(strrchr(__FILE__, '.'), 1);
1717

18-
// Report all errors, except notices
19-
error_reporting(E_ALL ^ E_NOTICE);
18+
// Report all errors, except notices and deprecation messages
19+
if (!defined('E_DEPRECATED'))
20+
{
21+
define('E_DEPRECATED', 8192);
22+
}
23+
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
2024

2125
require($phpbb_root_path . 'config.' . $phpEx);
2226

0 commit comments

Comments
 (0)