-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Return value of Mindshape\MindshapeCookieConsent\Utility\CookieUtility::getCookieValue() must be of the type array or null, bool returned #43
Comments
Hi @klodeckl, the only explenation I currently have in mind that some users have a mess in their cookie value and the json_decode just returns a boolean. Anyway, I will try to adjust this to prevent this exception. Greetings |
Thank you! :) |
I changed the function now to the following: if (false === self::hasCookie($name) || is_bool(json_decode($_COOKIE[$name], true)) === true) { return json_decode($_COOKIE[$name], true); I will check if the error won’t occur anymore now. Maybe instead of is_bool === true it would be better to check for is_array || is_null === false. |
Hi @klodeckl, an update with this fix is now released in TER. Greetings |
Thank you! |
Hi,
my TYPO3 log gets floodes with messages like:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Return value of Mindshape\MindshapeCookieConsent\Utility\CookieUtility::getCookieValue() must be of the type array or null, bool returned | TypeError thrown in file /xyz/typo3conf/ext/mindshape_cookie_consent/Classes/Utility/CookieUtility.php in line 34. Requested URL: https://www.tld.com/path/
Currently I don’t know how to reproduce the issue myself.
TYPO3 10, mindshape_cookie_consent 2.2.5
The text was updated successfully, but these errors were encountered: