Plugin fails on json_decode lines
-
Since the latest update 23 hours ago, my site generates multiple errors from the GDPR plugin, in the form
Cannot use object of type stdClass as array in ...– initial culprit is src/init.php, but if I fix those ones then it shifts to src/functions.php.The errors all seem to stem from a json_decode line with no
assocargument (and therefore returning an object) retrieving a cookie – on the next line the cookie is checked as an associative array, throwing the error.E.g. init.php line 278:
$cookie = json_decode(base64_decode($_COOKIE['njt_gdpr_allow_permissions']), true);
return isset($cookie['cookie']);Is this unique to my setup? (Have I perhaps got my PHP parser set up too strict?) or is this a breaking change for others?
The topic ‘Plugin fails on json_decode lines’ is closed to new replies.