From 485d4781af391636b5186eb1801cfc229e0a86e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Sat, 30 Dec 2023 14:19:16 +0100 Subject: [PATCH 1/3] Remove unneeded variable --- controllers/front/gdpr.php | 1 - 1 file changed, 1 deletion(-) diff --git a/controllers/front/gdpr.php b/controllers/front/gdpr.php index c81ca023..a520c647 100644 --- a/controllers/front/gdpr.php +++ b/controllers/front/gdpr.php @@ -59,7 +59,6 @@ public function initContent() 'psgdpr_front_controller' => Context::getContext()->link->getModuleLink('psgdpr', 'gdpr', $params, true), 'psgdpr_csv_controller' => Context::getContext()->link->getModuleLink('psgdpr', 'ExportCustomerData', array_merge(['type' => 'csv'], $params), true), 'psgdpr_pdf_controller' => Context::getContext()->link->getModuleLink('psgdpr', 'ExportCustomerData', array_merge(['type' => 'pdf'], $params), true), - 'psgdpr_ps_version' => (bool) version_compare(_PS_VERSION_, '1.7', '>='), 'psgdpr_id_customer' => Context::getContext()->customer->id, ]); From 664f479af74a5da4c742521a717eb1afc38f3595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Sat, 30 Dec 2023 14:22:23 +0100 Subject: [PATCH 2/3] Remove unneeded varialbe --- views/templates/front/account_gdpr_page.tpl | 1 - 1 file changed, 1 deletion(-) diff --git a/views/templates/front/account_gdpr_page.tpl b/views/templates/front/account_gdpr_page.tpl index e1104433..b70f6c96 100644 --- a/views/templates/front/account_gdpr_page.tpl +++ b/views/templates/front/account_gdpr_page.tpl @@ -41,7 +41,6 @@ {/literal} {/block} From c20252114faa6c35e5e50d9437e3c6b05484a253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Sat, 30 Dec 2023 14:36:51 +0100 Subject: [PATCH 3/3] Isset covers empty --- src/Controller/Admin/CustomerController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/Admin/CustomerController.php b/src/Controller/Admin/CustomerController.php index 6336b66d..552b4d9c 100644 --- a/src/Controller/Admin/CustomerController.php +++ b/src/Controller/Admin/CustomerController.php @@ -78,7 +78,7 @@ public function searchCustomers(Request $request): Response $requestBodyContent = json_decode($request->getContent(), true); $phrase = $requestBodyContent['phrase']; - if (!isset($phrase) && empty($phrase)) { + if (empty($phrase)) { return $this->json(['message' => 'Property phrase is missing or empty.'], Response::HTTP_BAD_REQUEST); }