简体   繁体   中英

PHP call-time pass-by-reference

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM