]> granicus.if.org Git - php/commitdiff
* PHP 4 fix for the E_STRICT check
authorStig Bakken <ssb@php.net>
Thu, 18 Dec 2003 22:09:17 +0000 (22:09 +0000)
committerStig Bakken <ssb@php.net>
Thu, 18 Dec 2003 22:09:17 +0000 (22:09 +0000)
pear/scripts/pearcmd.php

index 52723e0e3fdbd0baa8340520578c4cb82e0f71c4..28c4a049846a9ecfef71e70f9094186fb1b813fb 100644 (file)
@@ -33,7 +33,6 @@ ob_implicit_flush(true);
 ini_set('track_errors', true);
 ini_set('html_errors', false);
 ini_set('magic_quotes_runtime', false);
-error_reporting(E_ALL & ~E_NOTICE);
 set_error_handler('error_handler');
 
 $pear_package_version = "@pear_version@";
@@ -265,7 +264,7 @@ function cmdHelp($command)
 // }}}
 
 function error_handler($errno, $errmsg, $file, $line, $vars) {
-    if (error_reporting() == 0 || ($errno & E_STRICT)) {
+    if ((defined('E_STRICT') && $errno & E_STRICT) || !error_reporting()) {
         return; // @silenced error
     }
     $errortype = array (