【发布时间】:2014-06-24 09:06:28
【问题描述】:
我的网站上有这些错误:
严格标准:非静态方法 modJumiHelper::getCodeWritten() 不应在第 17 行的 /home/kmxsiksf/www/modules/mod_jumi/mod_jumi.php 中静态调用
严格标准:非静态方法 modJumiHelper::getStorageSource() 不应在第 18 行的 /home/kmxsiksf/www/modules/mod_jumi/mod_jumi.php 中静态调用
这里是 mod_jumi.php(第 17 行和第 18 行分别以 $code_written 和 $storage_source 开头)
defined('_JEXEC') or die('Restricted access');
if(!defined('DS')){
define('DS',DIRECTORY_SEPARATOR);
}
// Include the functions only once
require_once(dirname(__FILE__).DS.'helper.php');
$code_written = modJumiHelper::getCodeWritten($params); //code written or ""
$storage_source = modJumiHelper::getStorageSource($params); //filepathname or record id or ""
if(is_int($storage_source)) { //it is record id
$code_stored = modJumiHelper::getCodeStored($storage_source); //code or null(error]
}
require(JModuleHelper::getLayoutPath('mod_jumi'));
我为这个问题找到了许多解决方案,可以将函数转换为非静态函数,但是因为我对 PHP 了解不多,所以我找不到让它们工作的方法。
非常感谢您的帮助!
【问题讨论】:
标签: php joomla static joomla-extensions non-static