diff --git a/config.xml b/config.xml index d26acab..c3c0752 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ ps_legalcompliance - + diff --git a/ps_legalcompliance.php b/ps_legalcompliance.php index e6e9d5f..0230ee3 100644 --- a/ps_legalcompliance.php +++ b/ps_legalcompliance.php @@ -45,8 +45,8 @@ class Ps_LegalCompliance extends Module protected $entity_manager; protected $filesystem; protected $emails; - protected $_errors; - protected $_warnings; + protected $_errors = array(); + protected $_warnings = array(); /* Constants used for LEGAL/CMS Management */ const LEGAL_NO_ASSOC = 'NO_ASSOC'; @@ -64,7 +64,7 @@ public function __construct(EntityManager $entity_manager, { $this->name = 'ps_legalcompliance'; $this->tab = 'administration'; - $this->version = '2.0.4'; + $this->version = '3.0.1'; $this->author = 'PrestaShop'; $this->need_instance = 0; $this->bootstrap = true; @@ -860,7 +860,7 @@ public function hookDisplayProductPriceBlock($param) $product = $param['product']; $hook_type = $param['type']; - if (is_array($product)) { + if (! $product instanceof Product) { $product_repository = $this->entity_manager->getRepository('Product'); $product = $product_repository->findOne((int) $product['id_product']); }