Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php 5.4 compatibility for olympus #626

Merged
merged 2 commits into from
Mar 22, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 17 additions & 1 deletion phpBB/includes/startup.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,23 @@
{
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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oleg wanted to change this line again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the wording here is fine, if it's ok with you it's ok with me.

// 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
Expand Down