Prestashop PHP 7: Fix error while saving preferences

PHP 7 makes powering your Prestashop website a whole lot better and run very fast for deployment on a server with PHP5. Unfortunately, there are some small errors with Prestashop PHP 7. This tutorial will show you how to fix the error when save preferences in BO.

Prestashop PHP 7: Fix error while saving preferences

PHP7 or PHP5 ?

It's a simple question. PHP7 is faster than PHP5 and at the same level with HHVM ( HHVM is an open-source virtual machine designed for executing programs written in Hack and PHP, a son of Facebook team). Here are some benchmark between PHP7, HHVM and PHP5:

PHP7 vs HHVM on Wordpress 4.4

PHP7 vs HHVM on Wordpress 4.4

PHP7 vs PHP 5.6 vs HHVM on Drupal 8.0.1

PHP7 vs PHP 5.6 vs HHVM on Drupal 8.0.1

PHP7 vs PHP 5.6 vs HHVM on Magento 2.0 CE

PHP7 vs PHP 5.6 vs HHVM on Magento 2.0 CE

Prestashop not fully support PHP7 - that's why we don't have the benchmark on Prestashop. However, you can be sure that with PHP7, your Prestashop site will run very fast.

Prestashop PHP 7: Fix the error

When you try to customize your website's preferences, you will get the following errors on many screens:

PHP Fatal error:  Uncaught Error: Access to undeclared static property: Validate::$values in /your-root-folder/classes/controller/AdminController.php:1389

We need to open the above file and replace all of this type :

Validate::$values['property']

by

Validate::{$values['property']}

Your problem will be fixed and you could depoy a Prestashop website on PHP7.

Get this Advanced Cart Rules module

New module.

Xleft module

Xleft shows customers how much more they need to spend to get free shipping in real time.

Aktualizacja najnowszych modułów!

Age Restriction - 18+ ⊙
Rozwiąż niektóre problemy z wyświetlaniem na urządzeniach przenośnych.


Newsletter Popup v3.2.2
Edycja świąteczna, aby zwiększyć sprzedaż.


Trusty v1.4.7 ⊙
Kompatybilny zarówno z PrestaShop 1.7, jak i PrestaShop 8.

PrestaSOO team
Wszystko, czego potrzebujesz, aby zarabiać na życie wykonując pracę, którą kochasz.

Odkryć

To mądra inwestycja

Moduły PrestaShop, które stworzyliśmy jako pierwsze, aby rozwiązać problem naszego własnego biznesu - strona e-Commerce. Oznacza to, że są bardzo przydatne w poważnym biznesie. Jeśli cenisz swoją usługę internetową, te moduły są mądrą inwestycją.
Sarah Reeves, Programista aplikacji @ PrestaSOO
Wykonane z w Paris i Hanoi
PrestaSOO © 2024. Wszelkie prawa zastrzeżone. // Polityka prywatności Warunki usługi