diff --git a/psgdpr.php b/psgdpr.php index 00df5f8b..c6ba0fc9 100755 --- a/psgdpr.php +++ b/psgdpr.php @@ -893,7 +893,7 @@ public function deleteDataFromPrestashop($customer) $queries[] = "DELETE FROM `"._DB_PREFIX_."customer_thread` WHERE id_customer = ".(int)$customer->id; foreach ($queries as $query) { - if (Db::getInstance()->execute($query) == false) { + if (Db::getInstance()->execute($query) === false) { return false; } } @@ -923,7 +923,7 @@ public function createAnonymousCustomer() $query = 'SELECT id_customer, email FROM `'._DB_PREFIX_.'customer` c WHERE email = "anonymous@psgdpr.com" or email = "anonymous@anonymous.com"'; $anonymousCustomer = Db::getInstance()->getRow($query); - if ($anonymousCustomer['id_customer']) { + if (isset($anonymousCustomer['id_customer'])) { $id_address = Address::getFirstCustomerAddressId($anonymousCustomer['id_customer']); Configuration::updateValue('PSGDPR_ANONYMOUS_CUSTOMER', $anonymousCustomer['id_customer']);