diff --git a/CHANGELOG.md b/CHANGELOG.md index e2c35d1..0c796ed 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.14.2] - 23 August 2024 +### Fixed +- Guarantee return type is string #170 + ## [0.14.1] - 23 August 2024 ### Fixed - Add CSP nonces to inline scripts diff --git a/Plugin/AddCspInlineScripts.php b/Plugin/AddCspInlineScripts.php index 5137180..06ff649 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_webp2.')) { - return $html; + return (string)$html; } return $this->replaceInlineScripts->replace((string)$html); diff --git a/composer.json b/composer.json index 0d6f82c..f5e4f7f 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "yireo/magento2-webp2", "license": "OSL-3.0", - "version": "0.14.1", + "version": "0.14.2", "type": "magento2-module", "homepage": "https://www.yireo.com/software/magento-extensions/webp2", "description": "Magento 2 module to add WebP support to the Magento frontend",