1
votes

I am having a problem in that when I turn on the cache for my Joomla site I just get the error message: Fatal error: Cannot pass parameter 2 by reference in E:\sites\SC\xampp\htdocs\libraries\joomla\document\html\renderer\module.php on line 82

The line in question is (expanded from a single line for better readability):

$contents = $cache->get(
    array('JModuleHelper', 'renderModule'), 
    array( $module, $params ), 
    $module->id. $user->get('aid', 0)
);

I am not sure of how to solve this problem and any help would be greatly appreciated. Thank you for your time.

1
Your question needs some basic debugging first. Is that error related to $cache->get(...) or is it related to $user->get(...)? Both get functions are on the same line.hakre

1 Answers

0
votes

You can't bind the parameters inside the get() method - you should do it beforehand.
Try this:

$param1 = array('JModuleHelper', 'renderModule');
$param2 = array( $module, $params );
$param3 = $module->id. $user->get('aid', 0);
$contents =  $cache->get($param1, $param2, $param3);