Hi! I have a simple problem with Ja_News Frontpage module, but can’t fix it myself. Module work’s fine when a cache is disabled, but when I enable it in module settings, server returns following error:
Call to a member function get() on a non-object in D:AppServwwwmodulesmod_janews_fphelpershelper.php on line 36
line 36
if ( $params->get('cache') == "1" && $use_cache == "1") {
beginning of the helper.php
class modJaNewsFrontpageHelper extends JObject {
var $_module = null;
var $_params = null;
var $articles = array();
var $total = 0;
function __construct($module, $params = null) {
$this->_module = $module;
$this->loadConfig($params);
}
public function loadConfig($params, $modulename = "mod_janews_fp")
{
global $mainframe;
$use_cache = $mainframe->getCfg("caching");
$this->mod_params = $params;
if ( $params->get('cache') == "1" && $use_cache == "1") {
$cache =& JFactory::getCache();
$cache->setCaching( true );
$cache->setLifeTime( $params->get( 'cache_time', 30 ) * 60 );
$this->_params = $cache->get( array( (new modJaNewsFrontpageHelper() ) , 'loadProfile' ), array( $params, $modulename ) );
} else {
$this->_params = $this->loadProfile( $params, $modulename );
}
}
Please help