From 3f55fe04a3f2093e0dc89b83fb3b3c42b16000cd Mon Sep 17 00:00:00 2001 From: pdontthink Date: Sat, 28 Jul 2012 05:57:50 +0000 Subject: [PATCH] Separate E_STRICT reporting from E_ALL in internal debug mode (E_STRICT is included in E_ALL only as of PHP 5.4.0) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14335 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- config/conf.pl | 8 ++++---- include/init.php | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/config/conf.pl b/config/conf.pl index 2a208f12..61f2bf98 100755 --- a/config/conf.pl +++ b/config/conf.pl @@ -4641,12 +4641,12 @@ sub commandB8 { print "1 " . ($sm_debug_mode & 1 ? "y" : " ") . " Simple debugging (PHP E_ERROR)\n"; print "2 " . ($sm_debug_mode & 512 ? "y" : " ") - . " Moderate debugging (PHP E_ALL)\n"; + . " Moderate debugging (PHP E_ALL without E_STRICT)\n"; print "3 " . ($sm_debug_mode & 524288 ? "y" : " ") - . " Advanced debugging (PHP E_ALL plus log errors\n"; - print " intentionally suppressed)\n"; + . " Advanced debugging (PHP E_ALL (without E_STRICT) plus\n"; + print " log errors intentionally suppressed)\n"; print "4 " . ($sm_debug_mode & 536870912 ? "y" : " ") - . " Strict debugging (PHP E_STRICT)\n"; + . " Strict debugging (PHP E_ALL and E_STRICT)\n"; print "\n"; print "SquirrelMail debug mode (0,1,2,3,4) or d when done? : $WHT"; diff --git a/include/init.php b/include/init.php index 2017640d..eb533653 100644 --- a/include/init.php +++ b/include/init.php @@ -223,15 +223,17 @@ if (file_exists(SM_PATH . 'config/config_local.php')) { /** * Set PHP error reporting level based on the SquirrelMail debug mode + * E_STRICT = 2048 + * E_DEPRECATED = 8192 */ $error_level = 0; if ($sm_debug_mode & SM_DEBUG_MODE_SIMPLE) $error_level |= E_ERROR; if ($sm_debug_mode & SM_DEBUG_MODE_MODERATE || $sm_debug_mode & SM_DEBUG_MODE_ADVANCED) - $error_level |= E_ALL; + $error_level = ($error_level | E_ALL) & ~2048 & ~8192; if ($sm_debug_mode & SM_DEBUG_MODE_STRICT) - $error_level |= E_STRICT; + $error_level |= 2048 | 8192; error_reporting($error_level); -- 2.25.1