簡體   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