Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Error Warning: Parameter 1 expected to be a reference

Tags:

php

joomla

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?

like image 350
Vad Avatar asked May 05 '26 23:05

Vad


1 Answers

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.

like image 80
Yes Barry Avatar answered May 08 '26 14:05

Yes Barry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!