PHP 5.3:“...的声明应该与...的声明兼容”错误
升级到PHP 5.3后,我的应用程序被淹没了
After having upgraded to PHP 5.3, my application was inundated with
声明应该与...兼容。 ..
"Declaration of ... should be compatible with that of ..."
样式错误。我明白这些错误的性质,但我希望禁用它们。
style errors. I understand the nature of these errors, but I wish to disable them.
error_reporting
php.ini中的设置是E_ALL&〜(E_NOTICE | E_DEPRECATED)
,但是这个错误继续显示出来。我认为它被包含在 E_STRICT
中,但是我错了?
The error_reporting
setting in php.ini is "E_ALL & ~(E_NOTICE | E_DEPRECATED)"
, but this error continues to show up. I assumed it was included in E_STRICT
, but am I wrong?
这是一个 E_STRICT
错误。将您的php.ini设置更改为 E_ALL& 〜(E_NOTICE | E_DEPRECATED | E_STRICT)
...
但是默认情况下应该关闭它(不包括在 E_ALL
)。所以,如果你得到他们,那意味着它被转向某处。问题是在哪里?在您的文件中的任何地方声明 error_reporting(...)
如果是,请检查。如果没有,请确保您正在编辑正确的php.ini文件(检查 phpinfo()
)...您可以随时执行 grep
为 E_STRICT
尝试找到正在打开的位置...
But it should be turned off by default (it's not included in E_ALL
). So if you're getting them, that means it's being turned on somewhere. The question is, where? Do declare error_reporting(...)
anywhere in your files? If so, check them. If not, then be sure you're editing the right php.ini file (check phpinfo()
)... You could always do a grep
for E_STRICT
to try to find where it's being turned on...