-2

我从 php 得到这些错误:

Strict Standards: Redefining already defined constructor for class WP_Widget in /home/kyle/WordPressDev/wp-includes/widgets.php on line 93

Strict Standards: Non-static method AisisCore_Loader_AutoLoader::get_instance() should not be called statically in /home/kyle/WordPressDev/wp-content/themes/Aisis-Framework/CoreTheme/Setup.php on line 6

Strict Standards: Accessing static property AisisCore_Template_Builder::$_options as non static in /home/kyle/WordPressDev/wp-content/themes/Aisis-Framework/AisisCore/Template/Builder.php on line 51

Strict Standards: Accessing static property AisisCore_Template_Builder::$_options as non static in /home/kyle/WordPressDev/wp-content/themes/Aisis-Framework/AisisCore/Template/Builder.php on line 69

Strict Standards: Accessing static property AisisCore_Template_Builder::$_options as non static in /home/kyle/WordPressDev/wp-content/themes/Aisis-Framework/AisisCore/Template/Builder.php on line 70

这对于开发环境来说很好而且很花哨,但是我有一个显示这些错误的生产环境,现在我确实在我的 php.ini 中进行了设置error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT,然后我重新启动了 Apache 但仍然出现相同的错误,虽然修复它们很棒,我需要这些错误在产品中离开。

4

3 回答 3

2

您应该在生产中向用户隐藏所有类型的错误并记录它们。

为此,请将 display_errors 设置为 Off

display_errors = Off

只需将 error_reporting 设置为记录所有内容

error_reporting = E_ALL | E_STRICT
于 2013-05-18T02:43:06.853 回答
0

用于 phpinfo()查看您的操作路径php.ini。也许还有另一个php.ini系统使用。

于 2013-05-18T03:49:29.670 回答
0

尝试更改error_reportingE_ALL & ~(E_DEPRECATED | E_STRICT).

于 2013-05-18T02:39:18.680 回答