PHP Error Warning: Parameter 1 expected to be a re

2019-07-02 13:51发布

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?

标签: php joomla
1条回答
你好瞎i
2楼-- · 2019-07-02 14:30

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.

查看更多
登录 后发表回答