From bc8d5135af19d6b168386a6b3d3280a44f3408b5 Mon Sep 17 00:00:00 2001 From: Sanyi Date: Thu, 16 Nov 2023 15:22:25 +0100 Subject: [PATCH] IA-1261 --- Block/Snippets.php | 6 ++++-- CHANGELOG.md | 7 +++++++ composer.json | 2 +- etc/module.xml | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 CHANGELOG.md diff --git a/Block/Snippets.php b/Block/Snippets.php index 5db115c..59ffbb8 100644 --- a/Block/Snippets.php +++ b/Block/Snippets.php @@ -293,7 +293,8 @@ private function removeDefaultCategories(array $categoryIds): array */ public function getMerchantId(): string { - return (string) $this->configReader->getConfigValue(ConfigInterface::MERCHANT_ID); + $merchantId = $this->configReader->getConfigValue(ConfigInterface::MERCHANT_ID); + return is_array($merchantId) ? '' : (string) $merchantId; } /** @@ -303,7 +304,8 @@ public function getMerchantId(): string */ public function getSnippetUrl(): string { - return (string) $this->configReader->getConfigValue(ConfigInterface::SNIPPET_URL); + $snippetUrl = $this->configReader->getConfigValue(ConfigInterface::SNIPPET_URL); + return is_array($snippetUrl) ? '' : (string) $snippetUrl; } /** diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d5e7d86 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +Release notes: +============== + +2.0.11 +------- +* Fix + * Fixing type conversion for PHP 8.1. diff --git a/composer.json b/composer.json index 44c7858..b737421 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "php": ">7.0.1" }, "type": "magento2-module", - "version": "2.0.10", + "version": "2.0.11", "autoload": { "files": [ "registration.php" diff --git a/etc/module.xml b/etc/module.xml index 6af2b6a..fc853be 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,7 +1,7 @@ - +