From 4505b404cc31aed5059e5bccce53cba31fa3741d Mon Sep 17 00:00:00 2001 From: Jisse Reitsma Date: Fri, 23 Aug 2024 16:51:12 +0200 Subject: [PATCH] Cast string as return type --- CHANGELOG.md | 4 ++++ Plugin/AddCspInlineScripts.php | 2 +- composer.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9c0857..ea2ba25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.5.6] - 23 August 2024 +### Fixed +- Cast string as return type + ## [0.5.5] - 23 August 2024 ### Fixed - Add CSP nonces to inline scripts diff --git a/Plugin/AddCspInlineScripts.php b/Plugin/AddCspInlineScripts.php index ee548f1..4498d23 100644 --- a/Plugin/AddCspInlineScripts.php +++ b/Plugin/AddCspInlineScripts.php @@ -18,7 +18,7 @@ public function __construct( public function afterToHtml(Template $block, $html): string { if (false === strstr((string)$block->getNameInLayout(), 'yireo_nextgenimages.')) { - return $html; + return (string) $html; } return $this->replaceInlineScripts->replace((string)$html); diff --git a/composer.json b/composer.json index bcadd7a..66259e3 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "yireo/magento2-next-gen-images", "license": "OSL-3.0", - "version": "0.5.5", + "version": "0.5.6", "type": "magento2-module", "homepage": "https://www.yireo.com/software/magento-extensions/next-gen-images", "description": "Magento 2 module to add NextGen images support to the Magento frontend",