Correggi l'errore "Warning: end(): Argument #1 ($array) must be passed by reference, value given" su Prestashop

Questo errore viene visualizzato sul tuo negozio Prestashop a causa di un bug in
Prestashop sulle versioni 8.x.

Per correggere questo errore, è sufficiente aggiornare il tuo negozio Prestashop alla versione 8.0.5 o 8.1.1.

Se non desideri aggiornare il tuo negozio Prestashop, puoi applicare la seguente correzione:

# Apri il file: /ROOT/config/smarty.config.inc.php

# Cerca nel file questa riga di codice:

smartyRegisterFunction($smarty, 'modifier', 'end','end');# Sostituiscila con la seguente riga di codice:

smartyRegisterFunction($smarty, 'modifier', 'end','smarty_endWithoutReference');# Aggiungi il seguente codice alla fine del file:

function smarty_endWithoutReference($arrayValue) {
      return end($arrayValue);
}
# Salva il file



In alto