Non-static method PEAR::isError() should not be called statically

后端 未结 3 1701
[愿得一人]
[愿得一人] 2021-01-11 16:48

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

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-11 17:45

    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

    • whether there is another php.ini file being loaded (check phpinfo() output via Apache)
    • some script sets the error level.

    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.

提交回复
热议问题