0

It seems that the error I' posting about is quite common indeed, but as I know very little of php, I need to ask you shed further light on the following problem. On my website, after a Wordpress update, the following error is displayed: Fatal error: Call-time pass-by-reference has been removed in [...website...] on line 4.

Actually, the file the error refers t has the following code:

if (!empty($catid)) {
$Anno=0;
$Mese=0;
Pasw13_MeseAnnoCorrenti(&$Anno,&$Mese);
$ArchiviMesiAnno=Pasw13_ElencoAnniMesi("mesi",$catid,$Anno);
$ArchiviAnni=Pasw13_ElencoAnniMesi("anni",$catid,$Anno);
if (!empty($ArchiviMesiAnno) Or !empty($ArchiviAnni)){

As I've said, the error is on line 4, but I can't solve it out. Thanks in advance for your help Regards kowalski215

  • remove the `&`! Reference signs can only be in function definition, not in the function call. -> `Pasw13_MeseAnnoCorrenti($Anno,$Mese);` – Jeff May 26 '18 at 08:46
  • 1
    Possible duplicate of [PHP 5.4 Call-time pass-by-reference - Easy fix available?](https://stackoverflow.com/questions/8971261/php-5-4-call-time-pass-by-reference-easy-fix-available) – Jeff May 26 '18 at 08:46

1 Answers1

0

This error happens because of &$in function call which is deprecated, remove & and your code should work. Meaning that you should change:

Pasw13_MeseAnnoCorrenti(&$Anno,&$Mese);

to

Pasw13_MeseAnnoCorrenti($Anno,$Mese);

More information about error happening with wordpress can be found here - link

FilipRistic
  • 2,661
  • 4
  • 22
  • 31