Wordpress:未定义的通知错误显示,但php错误被禁用


Wordpress: undefined notice error showing but php errors disabled?

php.ini文件中,我有display_errors = offdisplay_startup_errors = off。同样在functions.php中,我有error_reporting(0);

wp-config.php中,我在顶部error_reporting(0); @ini_set('display_errors', 0);我也有define('WP_DEBUG', false); define('WP_DEBUG_LOG', false);

错误仍在显示?

我得到了许多Notice: Undefined variable:Notice: Use of undefined constant等。我稍后会调试它们,但我能做些什么来隐藏它们?

可能会为您的服务器实例加载另一个无法被wordpress覆盖的INI

您应该在wordpress安装根目录中查找任何本地INI;尝试禁用那里的错误。

有一个有用的答案可以帮助你:https://stackoverflow.com/a/7841902/2004910