Permalink
Browse files

Sort out the error_reporting for PHP 5.3. See #8701 for 2.7.x.

git-svn-id: http://svn.automattic.com/wordpress/branches/2.7@10421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent a539014 commit 4eb21652f8fc0c5b8528ce58af556b06c83f6a36 westi committed Jan 23, 2009
Showing with 3 additions and 3 deletions.
  1. +3 −3 wp-settings.php
View
@@ -201,9 +201,9 @@ function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(
if (defined('WP_DEBUG') and WP_DEBUG == true) {
error_reporting(E_ALL);
} else {
- if ( defined( 'E_DEPRECATED' ) )
- error_reporting(E_ALL ^ E_STRICT ^ E_DEPRECATED ^ E_NOTICE ^ E_USER_NOTICE);
- else if ( defined( 'E_STRICT' ) )
+ if ( defined( 'E_DEPRECATED' ) ) // Introduced in PHP 5.3
+ error_reporting( (E_ALL ^ E_DEPRECATED ^ E_NOTICE ^ E_USER_NOTICE) & E_STRICT);
+ else if ( defined( 'E_STRICT' ) ) // Introduced in PHP 5.0 not part of E_ALL
error_reporting( ( E_ALL ^ E_NOTICE ^ E_USER_NOTICE ) & E_STRICT);
else
error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE);

0 comments on commit 4eb2165

Please sign in to comment.