• Resolved Matt Neal

    (@mattfromrealcoder)


    G’day! I noticed in one of my forms when submitting, I was getting a critical error due to this plugin. I dumped the contents of the $options variable get_option('oopspamantispam_settings'). This is what it returns:

     array:12 [▼
    "oopspam_api_key_source" => "OOPSpamDashboard"
    "oopspam_api_key" => "REDACTED"
    "oopspam_spam_score_threshold" => "3"
    "oopspam_spam_movedspam_to_folder" => "spam"
    "oopspam_clear_spam_entries" => "monthly"
    "oopspam_clear_ham_entries" => "monthly"
    "oopspam_is_check_for_length" => "on"
    "oopspam_is_gf_activated" => "1"
    "oopspam_gf_spam_message" => "Unfortunately, it looks like your message was caught by our spam filter. Please email us at info@REDACTED.com.au directly."
    "oopspam_gf_content_field" => "null"
    "oopspam_gf_exclude_form" => ""
    "oopspam_api_key_usage" => "18602/100000"
    ]

    This part here: "oopspam_gf_content_field" => "null" is the issue. It looks like it’s a string “null”, so the plugin sees this and in:

    plugins/oopspam-anti-spam/integration/GravityForms.php:112

    There’s this:

        if (isset($options['oopspam_gf_content_field']) && $options['oopspam_gf_content_field']) {

    So that means oopspam_gf_content_field is string 'null', it’s both set AND is truthy.

    That then means the proceeding code within the if statement will run, and there’s a foreach that tries to run on $jsonData which is string 'null'. That’s when we get a fatal error because it’s trying to iterate over a string instead of an object/array ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author OOPSpam Team

    (@oopspam)

    Hi Matt,

    Thanks for letting us know!

    We are about to release a new update. I’ll make sure to include a fix for this as well.

    Update:
    We were able to replicate the issue and a fix will be available in the next release.

    • Mike
    • This reply was modified 3 weeks, 2 days ago by OOPSpam Team.
    • This reply was modified 3 weeks, 2 days ago by OOPSpam Team.
    Plugin Author OOPSpam Team

    (@oopspam)

    We just updated the plugin with a fix.

    Thanks again for letting us know!

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