简体   繁体   English

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

[英]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: 我将展示两种处理此类问题的方法:

Editing php.ini 编辑php.ini

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

Using the Joomla! 使用Joomla! admin configurations 管理员配置

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):

  1. In the Joomla! 在Joomla中! admin interface, go to System > Global Configuration . 管理界面,请转到System > Global Configuration

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

  2. Switch to the Server tab, Select 'None' in the Error Reporting box and click save . 切换到“ Server选项卡,在“ Error Reporting框中选择“无”,然后单击“ save

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

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.

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