PHP Error Warning: Parameter 1 expected to be a reference

懵懂的女人 提交于 2020-01-04 02:16:07

问题


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.



来源:https://stackoverflow.com/questions/8512535/php-error-warning-parameter-1-expected-to-be-a-reference

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!