我的服务器正在运行PHP5.3,而我的WordPress安装将这些错误传递给我,导致我的session_start()中断。
Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 647
Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 662
Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 669
Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 676
Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 712
这很烦人,但我不想关闭屏幕上的错误报告。如何禁用这些讨厌的不推荐使用的警告?
我运行的是WordPress 2.9.2。
发布于 2010-05-10 23:14:01
您可以通过调用以下函数在代码中完成此操作。
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
或
error_reporting(E_ALL ^ E_DEPRECATED);
发布于 2010-08-21 17:22:10
我需要调整它来适应
error_reporting = E_ALL & ~E_DEPRECATED
发布于 2012-02-24 15:38:01
要只获取那些导致应用程序停止工作的错误,请使用:
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED));
这将停止显示通知、警告和不推荐使用的错误。
https://stackoverflow.com/questions/2803772
复制相似问题