our error_handler did not allow to supporess just warnings

eg. by using: error_reporting(error_reporting()&~E_WARNING);
This commit is contained in:
Ralf Becker 2017-03-13 16:35:53 +01:00
parent 8f597194e0
commit bb5a845600

View File

@ -177,7 +177,7 @@ function egw_error_handler ($errno, $errstr, $errfile, $errline)
case E_USER_WARNING: case E_USER_WARNING:
// skip message for warnings supressed via @-error-control-operator (eg. @is_dir($path)) // skip message for warnings supressed via @-error-control-operator (eg. @is_dir($path))
// can be commented out to get suppressed warnings too! // can be commented out to get suppressed warnings too!
if (error_reporting() && if ((error_reporting() & $errno) &&
// silence "Declaration of $class::$method should be compatible with $parent::$method" warning // silence "Declaration of $class::$method should be compatible with $parent::$method" warning
!(substr($errstr, 0, 15) === 'Declaration of ' && !(substr($errstr, 0, 15) === 'Declaration of ' &&
strpos($errstr, ' should be compatible with ') !== false)) strpos($errstr, ' should be compatible with ') !== false))