Skip to content

Commit 656c3b3

Browse files
authored
Merge pull request #59 from tthierryEra/fix-for-m2.4.4-php8
Fix for php8 and Magento 2.4.4
2 parents c66ab94 + 3480995 commit 656c3b3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Plugin/View/LayoutPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private function getBlockInfo(\Magento\Framework\View\Element\AbstractBlock $blo
173173
'phpClass' => $this->getBlockClass($block),
174174
],
175175
'extra' => [
176-
'cacheKeyInfo' => $block->getCacheKeyInfo()
176+
'cacheKeyInfo' => @$block->getCacheKeyInfo()
177177
],
178178
'paths' => [
179179
'template' => $block->getTemplateFile(),
@@ -206,7 +206,7 @@ private static function filterEscape($data)
206206
if (is_array($elem)) {
207207
return self::filterEscape($elem);
208208
}
209-
return addslashes($elem); // @codingStandardsIgnoreLine
209+
return is_null($elem) ? $elem : addslashes($elem); // @codingStandardsIgnoreLine
210210
}, $data));
211211
}
212212

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
],
1414
"require": {
15-
"php": "~7.1"
15+
"php": "~7.4||~8.1.0"
1616
},
1717
"type": "magento2-module",
1818
"license": "BSD-2-Clause",

etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
-->
66

77
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
8-
<module name="Ho_Templatehints" setup_version="0.2.3"/>
8+
<module name="Ho_Templatehints" setup_version="0.2.5"/>
99
</config>

0 commit comments

Comments
 (0)