• Resolved MarrsAttax

    (@marrsattax)


    Hi Meghan

    Great plugin. I’ve found a bug. I’ve selected the ajax option and chosen not to have the confirm email address box. The email gets sent but the confirmation message doesn’t display. The ajax is trying to validate the confirm email field which doesn’t exist. Here is the error I get in FireBug:

    Status: parsererrorError: SyntaxError: JSON.parse: unexpected characterResponse: <br />
    <b>Notice</b>:  Undefined index: confirm-email in <b>/var/www/bdstadia.co.uk/htdocs/europe/wp-content/plugins/clean-and-simple-contact-form-by-meg-nicholas/class.cscf_contact.php</b> on line <b>33</b><br />
    {"sent":true,"valid":true,"errorlist":[]}

    I fixed it by changing the line to

    if (isset($cscf['confirm-email'])) {
                    $this->ConfirmEmail = filter_var($cscf['confirm-email'], FILTER_SANITIZE_EMAIL);
                }

    Hope this helps.

    http://wordpress.org/plugins/clean-and-simple-contact-form-by-meg-nicholas/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi marrsattax

    Yes I should really check that the array element it is set before sanitising it.

    It has produced a ‘notice’ rather than an error which shouldn’t really break things unless your php installation is set to raise notices as errors.

    I will change this in the next version. Thanks for your input.

    Meg

    Just to let you know that version 4.2.5 now fixes this. Thanks for your help. Meg

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Ajax Bug when not using Confirm Email’ is closed to new replies.