未定义索引,不能修改头信息调试


Undefined index and cannot modify header info debug

我在切换wp_debug后得到这个

Notice: Undefined index: enabled in /home/bhrmwgng/public_html/metasyfe.com/wp-content/plugins/above-the-fold-optimization/includes/localizejs.class.php on line 123
Warning: Cannot modify header information - headers already sent by (output started at /home/bhrmwgng/public_html/metasyfe.com/wp-content/plugins/above-the-fold-optimization/includes/localizejs.class.php:123) in /home/bhrmwgng/public_html/metasyfe.com/wp-includes/pluggable.php on line 1207

从WordPress 2.5版本开始,将WP_DEBUG设置为true也会将错误报告级别提高到E_ALL,并在使用弃用的函数或文件时激活警告;否则,WordPress将错误报告级别设置为E_ALL ^ E_NOTICE ^ E_USER_NOTICE。

这会导致这些不是错误的消息,显示NoticeWarning级别。

见:http://php.net/manual/es/function.error-reporting.php