NYCPHP Meetup

NYPHP.org

[joomla] PHP 5.3 and Joomla

Hans Zaunere lists at zaunere.com
Wed Apr 29 17:25:13 EDT 2009


> I've upgraded a dev. server to 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).
> 
> I'm investigating as to if the problem is fixable, but has anyone tackled
> this before?

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 /var/www/xxx/libraries/joomla/cache/handler/callback.php on
line 100, referer: http://xxx/login

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?

H






More information about the Joomla mailing list