From ac7631e20be0ccc790be7cb5c6dcb34341e7825a Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Sat, 24 Jan 2009 13:01:37 +0000 Subject: [PATCH] Error reporting (again\!) See #8701 props jacobsantos. git-svn-id: https://develop.svn.wordpress.org/trunk@10431 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-settings.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index f9d694f6ee..109a32c2b1 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -201,10 +201,11 @@ timer_start(); 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); }