Title: Plugin fails on json_decode lines
Last modified: November 6, 2020

---

# Plugin fails on json_decode lines

 *  Resolved [amcnicoll](https://wordpress.org/support/users/amcnicoll/)
 * (@amcnicoll)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/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 `assoc` argument (
   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?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Data443 Risk Mitigation, Inc.](https://wordpress.org/support/users/data443/)
 * (@data443)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-fails-on-json_decode-lines/#post-13634254)
 * Hi [@amcnicoll](https://wordpress.org/support/users/amcnicoll/) ,
    We searched
   this script on both plugins (GDPR Framework and Ninja form GDPR) unsuccessfully.
   We recommend you should contact the support of Ninja form plugin and, eventually,
   contact the hosting company and ask them if the PHP cURL library is enabled.

Viewing 1 replies (of 1 total)

The topic ‘Plugin fails on json_decode lines’ is closed to new replies.

 * ![](https://ps.w.org/gdpr-for-ninja-forms/assets/icon.svg?rev=2331385)
 * [Ninja Forms: GDPR Framework Add-On](https://wordpress.org/plugins/gdpr-for-ninja-forms/)
 * [Support Threads](https://wordpress.org/support/plugin/gdpr-for-ninja-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/gdpr-for-ninja-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gdpr-for-ninja-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gdpr-for-ninja-forms/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Data443 Risk Mitigation, Inc.](https://wordpress.org/support/users/data443/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/plugin-fails-on-json_decode-lines/#post-13634254)
 * Status: resolved