Permalink
Browse files

Error reporting (again). For 2.7.x, See #8701 props jacobsantos.

git-svn-id: http://svn.automattic.com/wordpress/branches/2.7@10432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
westi
westi committed Jan 24, 2009
1 parent 66eaffb commit de5b34272541ea4916cfd66e3e907bd76732b496
Showing with 5 additions and 4 deletions.
  1. +5 −4 wp-settings.php
View
@@ -201,10 +201,11 @@ 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' ) ) // 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);
+ // Unicode Extension is in PHP 6.0 only or do version check when this changes.
+ if ( version_compare( '6.0', phpversion(), '>' ) )
+ error_reporting( E_ALL ^ E_DEPRECATED ^ E_NOTICE ^ E_USER_NOTICE ^ E_STRICT );
+ else if ( defined( 'E_DEPRECATED' ) ) // Introduced in PHP 5.3
+ error_reporting( E_ALL ^ E_DEPRECATED ^ E_NOTICE ^ E_USER_NOTICE );
else
error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE);
}

0 comments on commit de5b342

Please sign in to comment.