Support Forum Support Forum GDPR Cookie Compliance Bug in license validation code

Topic Resolution: Resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Premium
    AvatarShowcare Licensing
    July 17, 2020 @ 9:55 pm

    PHP Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /var/app/current/wp-content/plugins/gdpr-cookie-compliance/controllers/class-moove-gdpr-license-manager.php:50\nStack trace:\n#0 /var/app/current/wp-content/plugins/gdpr-cookie-compliance/controllers/class-moove-gdpr-license-manager.php(94): Moove_GDPR_License_Manager->validate_license(‘XXXX’, ‘gdpr’, ‘update’)\n#1 /var/app/current/wp-content/plugins/gdpr-cookie-compliance-addon/controllers/class-moove-gdpr-updater.php(171): Moove_GDPR_License_Manager->get_premium_add_on(‘XXXX’, ‘update’)\n#2 /var/app/current/wp-content/plugins/gdpr-cookie-compliance-addon/controllers/class-moove-gdpr-updater.php(117): Moove_GDPR_Updater->get_addon_updates()\n#3 /var/app/current/wp-content/plugins/gdpr-cookie-compliance-addon/controllers/class-moove-gdpr-updater.php(51): Moove_GDPR_Updater->gdpr_check_for_updates()\n#4 /var/app/current/wp-content/plugins/gdpr-cookie-compliance-addon/controllers/class-moove-gdpr-updater.php(297): Moove_GDPR_Up in /var/app/current/wp-content/plugins/gdpr-cookie-compliance/controllers/class-moove-gdpr-license-manager.php on line 50

    Your if statement does not adequately check the return value from wp_remote_get() (class-moove-gdpr-license-manager.php line 42)

    if ( ! isset( $response[‘body’] ) || ! json_decode( $response[‘body’], true ) ) {

    An !is_array($response) as the first portion of the if might be the best option. It would probably be best to log the WP_Error as well in the message on the return object.

    Returning false for the license validation also seems incorrect. It is not always the plugin users fault that there was no response.

    Please confirm that this failure will not disable the plugin for public users.

    Thank you.

    Moove AgencyMoove Agency
    July 28, 2020 @ 9:42 am

    Hi Showcare Licensing,

    Thanks for reporting the issue.
    We have fixed the licence manager, the new versions are released. Please update your plugins to the latest version and the issue should be fixed.


Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.