You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've update to klaro-consent-manager 1.3.0 yesterday.
After the update our website was not more accesible because of an internal error.
The log was flooded with the following entries: request.CRITICAL: Uncaught PHP Exception TypeError: "html_entity_decode() expects parameter 1 to be string, array given" at /contao/vendor/pdir/klaro-consent-manager/src/Hooks/GeneratePageHook.php line 262 {"exception":"[object] (TypeError(code: 0): html_entity_decode() expects parameter 1 to be string, array given at /contao/vendor/pdir/klaro-consent-manager/src/Hooks/GeneratePageHook.php:262)"} []
Steps to reproduce
Upgrade to klaro-consent-manager and try to open the web page
Expected behavior
Website comes up
Screenshots
Environment
PHP 7.4
Contao 4.13.38
Bugfix
We've located the error in commit 7f67496 in src/Hooks/GeneratePageHook.php
We've changed line 261 in src/Hooks/GeneratePageHook.php from array_walk($arrCookies, static function ($cookie) use (&$arrResult): void { $arrResult[] = html_entity_decode(str_replace(''', "'", $cookie)); });
to array_walk($arrCookies, static function ($cookie) use (&$arrResult): void { $arrResult[] = html_entity_decode(str_replace(''', "'", $cookie['key'])); });
after this patch the website operates normally.
The text was updated successfully, but these errors were encountered:
Bug description
We've update to klaro-consent-manager 1.3.0 yesterday.
After the update our website was not more accesible because of an internal error.
The log was flooded with the following entries:
request.CRITICAL: Uncaught PHP Exception TypeError: "html_entity_decode() expects parameter 1 to be string, array given" at /contao/vendor/pdir/klaro-consent-manager/src/Hooks/GeneratePageHook.php line 262 {"exception":"[object] (TypeError(code: 0): html_entity_decode() expects parameter 1 to be string, array given at /contao/vendor/pdir/klaro-consent-manager/src/Hooks/GeneratePageHook.php:262)"} []
Steps to reproduce
Upgrade to klaro-consent-manager and try to open the web page
Expected behavior
Website comes up
Screenshots
Environment
PHP 7.4
Contao 4.13.38
Bugfix
We've located the error in commit 7f67496 in src/Hooks/GeneratePageHook.php
We've changed line 261 in src/Hooks/GeneratePageHook.php from
array_walk($arrCookies, static function ($cookie) use (&$arrResult): void { $arrResult[] = html_entity_decode(str_replace(''', "'", $cookie)); });
to
array_walk($arrCookies, static function ($cookie) use (&$arrResult): void { $arrResult[] = html_entity_decode(str_replace(''', "'", $cookie['key'])); });
after this patch the website operates normally.
The text was updated successfully, but these errors were encountered: