diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-03-15 22:47:42 -0400 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-03-15 22:47:42 -0400 |
commit | 5efdbfa5e4e3c00c08167cdfff912ee4937f4fd2 (patch) | |
tree | 76386dd7a53bc48281f9066c620fd1b081870330 /phpBB/includes | |
parent | 71afba0dedd2fcc4e478e191acc23277df8209c9 (diff) | |
download | forums-5efdbfa5e4e3c00c08167cdfff912ee4937f4fd2.tar forums-5efdbfa5e4e3c00c08167cdfff912ee4937f4fd2.tar.gz forums-5efdbfa5e4e3c00c08167cdfff912ee4937f4fd2.tar.bz2 forums-5efdbfa5e4e3c00c08167cdfff912ee4937f4fd2.tar.xz forums-5efdbfa5e4e3c00c08167cdfff912ee4937f4fd2.zip |
[task/php54] Disable E_STRICT in Olympus when running on PHP 5.4.
We cannot use static in Olympus because it must be PHP 4 compatible.
Therefore disable E_STRICT for Olympus.
This commit should be reverted for Ascraeus.
PHPBB3-10615
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/startup.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php index 178fb30435..cf216a65db 100644 --- a/phpBB/includes/startup.php +++ b/phpBB/includes/startup.php @@ -20,6 +20,21 @@ if (!defined('E_DEPRECATED')) define('E_DEPRECATED', 8192); } $level = E_ALL & ~E_NOTICE & ~E_DEPRECATED; +if (version_compare(PHP_VERSION, '5.4.0-dev', '>=')) +{ + // PHP 5.4 adds E_STRICT to E_ALL. + // Our utf8 normalizer triggers E_STRICT output on PHP 5.4. + // Unfortunately it cannot be made E_STRICT-clean while + // continuing to work on PHP 4. + // Therefore, in phpBB 3.0.x we disable E_STRICT on PHP 5.4+, + // while phpBB 3.1 will fix utf8 normalizer. + // E_STRICT is defined starting with PHP 5 + if (!defined('E_STRICT')) + { + define('E_STRICT', 2048); + } + $level &= ~E_STRICT; +} error_reporting($level); /* |