繁体   English   中英

Joomla 3.1.5,SJ模板和YT框架的PHP错误

[英]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.ini文件中编辑以下指令,告诉PHP引擎隐藏这些消息来解决此问题:

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

使用Joomla! 管理员配置

您还可以从Joomla UI更改指令(以下内容取自Joomla!3.1.5):

  1. 在Joomla中! 管理界面,请转到System > Global Configuration

    Joomla中的“全局配置”菜单!管理面板

  2. 切换到“ Server选项卡,在“ Error Reporting框中选择“无”,然后单击“ save

    Joomla中的“服务器”选项卡!全局配置

这将删除所有PHP错误消息,因此现在您必须依靠日志来检测问题。

建议在生产环境中使用此配置,因为在开发和测试过程中错误报告非常有用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM