Skip to content

Commit

Permalink
Guarantee return type is string
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma committed Aug 23, 2024
1 parent 8242247 commit 71cfa55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Plugin/AddCspInlineScripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 71cfa55

Please sign in to comment.