表达式引擎模块DevDevDevon–由MAMP运行时在本地显示php错误的更新程序


Expression Engine module DevDemon – Updater displaying php errors on local when run by MAMP

在本地环境中,我尝试通过DevDevDevon安装表达式引擎模块Updater。主MAMP php.ini文件和本地php.ini文件都有以下设置:

error_reporting = E_ALL & ~E_STRICT & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING display_errors = Off

然而,这些错误仍在显示:

A PHP Error was encountered
Severity: 8192
Message: Non-static method Updater_helper::arrayExtend() should not be called statically, assuming $this from incompatible context
Filename: updater/api.updater.php
Line Number: 109
A PHP Error was encountered
Severity: 8192
Message: Non-static method Updater_helper::getThirdPartyPath() should not be called statically, assuming $this from incompatible context
Filename: updater/api.updater.php
Line Number: 132
A PHP Error was encountered
Severity: 8192
Message: Non-static method Updater_helper::getThemePath() should not be called statically, assuming $this from incompatible context
Filename: updater/api.updater.php
Line Number: 133
A PHP Error was encountered
Severity: 8192
Message: Non-static method Updater_helper::getThirdPartyThemePath() should not be called statically, assuming $this from incompatible context
Filename: updater/api.updater.php
Line Number: 134
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /Users/Michael/Sites/creativevisuals/system/codeigniter/system/core/Exceptions.php:170)
Filename: core/Common.php
Line Number: 412

为什么这些错误仍然显示?每次编辑php.ini文件时,我都尝试重新启动MAMP服务器,而phpinfo()反映了这些设置处于活动状态的事实。

然而,当我在api.updater.php中的第109行之后运行phpinfo()时,设置发生了变化。不知怎么的,这个脚本覆盖了php设置。为什么以及在哪里这样做?

我假设您使用的是导致这些错误的PHP 5.6。大多数开发人员还不支持它,如果您想消除错误,请在函数名前面添加一个"static"。