andie_cc Posted November 6, 2020 Share Posted November 6, 2020 Team, I am new to prestashop and it is not been as easy as I thought it would be. So I enter a new category but I cannot update the description. I type and save but nothing happens. I activated debug mode: Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in C:\xampp\htdocs\mi_tienda\src\Adapter\EntityMapper.php on line 99 This is the error that comes up, very clear so I went to the EntityMapper file and checked line 99 and I could change the array_key_exists for isset or property_exists but this cause and even bigger error: Fatal error: Uncaught Error: Cannot access protected property Shop::$id_shop in C:\xampp\htdocs\mi_tienda\src\Adapter\EntityMapper.php:100 Stack trace: #0 C:\xampp\htdocs\mi_tienda\classes\ObjectModel.php(264): PrestaShop\PrestaShop\Adapter\EntityMapper->load('1', NULL, Object(Shop), Array, NULL, true) #1 C:\xampp\htdocs\mi_tienda\classes\shop\Shop.php(128): ObjectModelCore->__construct('1', NULL, NULL) #2 C:\xampp\htdocs\mi_tienda\classes\shop\Shop.php(413): ShopCore->__construct('1') #3 C:\xampp\htdocs\mi_tienda\config\config.inc.php(119): ShopCore::initialize() #4 C:\xampp\htdocs\mi_tienda\admin1\index.php(40): require('C:\\xampp\\htdocs...') #5 {main} thrown in C:\xampp\htdocs\mi_tienda\src\Adapter\EntityMapper.php on line 100 Here´s the line 100 and I have no idea what is wrong with this or how to correct so many errors. Shouldn´t CMS be about as easy as not programming? :( foreach ($object_datas as $key => $value) { if (isset($key, $entity_defs['fields']) || isset($key, $entity)) { $entity->{$key} = $value; } else { unset($object_datas[$key]); } } Link to comment Share on other sites More sharing options...
JBW Posted November 10, 2020 Share Posted November 10, 2020 Looks like you are using PHP 7.4 - Prestashop 1.7.6 is only compatible up to PHP 7.2 - after downgrading please delete /var/cache folder Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now