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

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

在我的本地环境中,我尝试通过 DevDemon 安装表达式引擎模块更新程序。主 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"。