mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[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
This commit is contained in:
parent
71afba0ded
commit
5efdbfa5e4
1 changed files with 15 additions and 0 deletions
|
@ -20,6 +20,21 @@ if (!defined('E_DEPRECATED'))
|
||||||
define('E_DEPRECATED', 8192);
|
define('E_DEPRECATED', 8192);
|
||||||
}
|
}
|
||||||
$level = 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);
|
error_reporting($level);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue