[英]PHP errors with Joomla 3.1.5, SJ template and YT framework
在YT框架上将Joomla 3.15与SJ模板一起使用时,出现以下错误:
Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\global\plugins\system\yt\includes\libs\yt-minify.php on line 120
Strict Standards: Non-static method JSite::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\global\plugins\system\yt\includes\site\lib\yt_template.php on line 107
Strict Standards: Non-static method JApplication::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\global\includes\application.php on line 593
Strict Standards: Non-static method JSite::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\global\plugins\system\yt\includes\site\lib\yt_template.php on line 107
Strict Standards: Non-static method JApplication::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\global\includes\application.php on line 593
我还安装了YT框架,但仍然出现这些错误。
这是PHP错误报告的结果。
一些Joomla扩展包含编码问题,其中一些比其他问题更微妙,那些会触发“ Strict
和“ Notice
消息(有时甚至更糟)。
我将展示两种处理此类问题的方法:
您可以通过在php.ini
文件中编辑以下指令,告诉PHP引擎隐藏这些消息来解决此问题:
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
您还可以从Joomla UI更改指令(以下内容取自Joomla!3.1.5):
在Joomla中! 管理界面,请转到System > Global Configuration
。
切换到“ Server
选项卡,在“ Error Reporting
框中选择“无”,然后单击“ save
。
这将删除所有PHP错误消息,因此现在您必须依靠日志来检测问题。
建议在生产环境中使用此配置,因为在开发和测试过程中错误报告非常有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.