Warning: Parameter 1 to modMainMenuHelper::buildXML() expected
Since I’ve upgraded my server to php 5.3 and it’s severely broken Joomla. While I’ve turned off all the obvious errors, there are things that just don’t work (like certain docman templates not showing up).
So actually most things appear to work without issue. However I did find one culprit.
In /libraries/joomla/cache/handler/callback.php around line 99 there’s:
$result = call_user_func_array($callback,$args);
which ends up triggering an error:
Parameter 1 to modMainMenuHelper::buildXML() expected to be a reference, value given in /libraries/joomla/cache/handler/callback.php on line 99
So in modules/mod_mainmenu/helper.php around line 31 I simple changed:
function buildXML(&$params)
to
function buildXML($params)
This works for now but perhaps it’s not a good solution, especially over the long term. The problem being that in 5.3, when there’s a value/reference mismatch, NULL is passed in. Whereas with 5.2, it’s effectively ignored and it doesn’t really matter.
This might be a long term problem with using call_user_func_array() in
general but I’m not sure of a better solution?
from: http://old.nabble.com/PHP-5.3-and-Joomla-td23304176.html