Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

Fix compatibility issues with PHP 7.2 & PS 1.7.5 #42

Merged
merged 3 commits into from Sep 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.xml
Expand Up @@ -2,7 +2,7 @@
<module>
<name>ps_legalcompliance</name>
<displayName><![CDATA[Legal Compliance]]></displayName>
<version><![CDATA[2.0.4]]></version>
<version><![CDATA[3.0.1]]></version>
<description><![CDATA[This module helps merchants in getting compliant with applicable e-commerce law.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[administration]]></tab>
Expand Down
8 changes: 4 additions & 4 deletions ps_legalcompliance.php
Expand Up @@ -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';
Expand All @@ -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;
Expand Down Expand Up @@ -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']);
}
Expand Down