aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-03-22 10:49:37 +0100
committerAndreas Fischer <bantu@phpbb.com>2012-03-22 10:49:37 +0100
commite5205ba2f85ac05567ddb92d8eab6ba002d76375 (patch)
tree29b54913bd695cd4cc77760a95eb8c6942a1f884
parentdad37a4329ae855372aaf4d5289fe0c2b844a84f (diff)
parent5efdbfa5e4e3c00c08167cdfff912ee4937f4fd2 (diff)
downloadforums-e5205ba2f85ac05567ddb92d8eab6ba002d76375.tar
forums-e5205ba2f85ac05567ddb92d8eab6ba002d76375.tar.gz
forums-e5205ba2f85ac05567ddb92d8eab6ba002d76375.tar.bz2
forums-e5205ba2f85ac05567ddb92d8eab6ba002d76375.tar.xz
forums-e5205ba2f85ac05567ddb92d8eab6ba002d76375.zip
Merge remote-tracking branch 'p/task/php54-olympus' into develop-olympus
* p/task/php54-olympus: [task/php54] Disable E_STRICT in Olympus when running on PHP 5.4. [task/php54] Refactor error_reporting call slightly.
-rw-r--r--phpBB/includes/startup.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php
index bbe2f127f1..cf216a65db 100644
--- a/phpBB/includes/startup.php
+++ b/phpBB/includes/startup.php
@@ -19,7 +19,23 @@ if (!defined('E_DEPRECATED'))
{
define('E_DEPRECATED', 8192);
}
-error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
+$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);
/*
* Remove variables created by register_globals from the global scope