PHP Error Warning: Parameter 1 expected to be a re

2019-07-02 14:43发布

问题:

I am "familiar" with PHP and my friend had his site broken with error:

Warning: Parameter 1 to Some_function_name() expected to be a reference, 
value given in /.../public_html/includes/tng/tNG.class.php on line 219

line 219:

$ret = call_user_func_array($callBackFunction,$tempParam);

I am not sure what happened on his server, but hosting company team said something about the Joomla and PHP conflict. How can I fix it?

回答1:

Check the function signature of Some_Function_name(), you probably have something like:

function Some_Function_name(&$param1)
{
    // ...

This is a PHP 5.3 compatibility issue. You could remove the reference operator & from the argument $param1. Or you could rollback to PHP 5.2.x if absolutely necessary.



标签: php joomla