After upgrading from RHEL 5x to CentOS 6x, I started seeing these errors in my httpd log:
PHP Strict Standards: Non-static method PEAR::isError() sh
It may be worth noting that that calling PEAR::isError($obj)
with one argument is equivalent to is_a($obj, 'PEAR_Error')
, if you're updating your own code. I know it is not best practice to "unwrap" a library method like that, but it is basically just an "instance of" check.
I'm afraid @johannes is incorrect - this is very doable. Simply substitute this in your recipe:
if ((new PEAR)->isError($mdb2_dbx)) {
// Victory! Er, I mean, Error!
...
}
No there isn't. PEAR::isError
is legacy from PHP 4 times.
If changing the error level in php.ini
is not enough you should check
If all that doesn't help, set an appropriate level using the error_level()
function at runtime, or if nothing else helps, suppress the errors using the @
operator. Using @
should be avoided as it is relatively "slow" (error reporting is slow anyways ...) and it might hide other errors.
Long-term suggestion would be to use more modern libraries.