Vad
Vad

Reputation: 3740

PHP Error Warning: Parameter 1 expected to be a reference

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?

Upvotes: 3

Views: 9107

Answers (1)

Yes Barry
Yes Barry

Reputation: 9866

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.

Upvotes: 7

Related Questions