[英]PHP errors with Joomla 3.1.5, SJ template and YT framework
While using Joomla 3.15 with SJ template with YT framework , I am getting the following errors: 在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
I also installed the YT framework but I'm still still getting these errors. 我还安装了YT框架,但仍然出现这些错误。
This is the result of the PHP error reporting. 这是PHP错误报告的结果。
Some Joomla extensions contain coding issues, some more subtle than others and those trigger Strict
and Notice
messages (and sometimes even worse). 一些Joomla扩展包含编码问题,其中一些比其他问题更微妙,那些会触发“ Strict
和“ Notice
消息(有时甚至更糟)。
I will show 2 ways of dealing with this type of issues: 我将展示两种处理此类问题的方法:
You can handle this by telling the PHP engine to hide those messages by editing the following directive in your php.ini
file: 您可以通过在php.ini
文件中编辑以下指令,告诉PHP引擎隐藏这些消息来解决此问题:
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
You can also change the directive from the Joomla UI (the following is taken from Joomla! 3.1.5): 您还可以从Joomla UI更改指令(以下内容取自Joomla!3.1.5):
In the Joomla! 在Joomla中! admin interface, go to System > Global Configuration
. 管理界面,请转到System > Global Configuration
。
Switch to the Server
tab, Select 'None' in the Error Reporting
box and click save
. 切换到“ Server
选项卡,在“ Error Reporting
框中选择“无”,然后单击“ save
。
This will remove all of the PHP error messages, so now you will have to rely on the logs to detect problems. 这将删除所有PHP错误消息,因此现在您必须依靠日志来检测问题。
It is the recommended configuration for production, as error reporting is useful during development and testing. 建议在生产环境中使用此配置,因为在开发和测试过程中错误报告非常有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.