From 55bcb35fbb39d20e4aa92f5d1db1a0a92a10e70e Mon Sep 17 00:00:00 2001 From: chuccv Date: Tue, 23 Nov 2021 15:11:36 +0700 Subject: [PATCH 1/3] [Fix Bug] Popup not showing when setting "Exclude Page(s) with URL contains" --- Block/Popup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Block/Popup.php b/Block/Popup.php index 2490834..44abab6 100644 --- a/Block/Popup.php +++ b/Block/Popup.php @@ -233,7 +233,7 @@ public function checkExcludePaths() $pathsUrl = array_map('trim', $arrayPaths); foreach ($pathsUrl as $path) { - if (strpos($currentPath, $path) !== false) { + if (!empty($path) && strpos($currentPath, $path) !== false) { return false; } } From 5cd1686402aef7aa286baa34f6d3672d3e57eb5a Mon Sep 17 00:00:00 2001 From: justin Date: Mon, 11 Jul 2022 10:25:12 +0700 Subject: [PATCH 2/3] compatible php 8.1 --- Block/Popup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Block/Popup.php b/Block/Popup.php index 44abab6..17c8e6b 100644 --- a/Block/Popup.php +++ b/Block/Popup.php @@ -212,7 +212,7 @@ public function checkExclude() public function checkExcludePages() { $fullActionName = $this->getRequest()->getFullActionName(); - $arrayPages = explode("\n", $this->_helperData->getWhereToShowConfig('exclude_pages')); + $arrayPages = explode("\n", $this->_helperData->getWhereToShowConfig('exclude_pages') ?: ''); $includePages = array_map('trim', $arrayPages); return !in_array($fullActionName, $includePages, true); From b65b4999781afb11fa79e7cad993ddcadb2cd30a Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Jul 2022 16:07:32 +0700 Subject: [PATCH 3/3] Clean code --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 5ce55b0..4e4bdfe 100644 --- a/composer.json +++ b/composer.json @@ -2,11 +2,11 @@ "name": "mageplaza/module-better-popup", "description": "Magento 2 Better Popup", "require": { - "mageplaza/module-core": "^1.4.5", - "mageplaza/module-smtp": "^4.5.3" + "mageplaza/module-core": "^1.4.12", + "mageplaza/module-smtp": "^4.7.2" }, "type": "magento2-module", - "version": "4.1.2", + "version": "4.1.3", "license": "proprietary", "authors": [ {