Page 1 of 1

google reCAPTCHA V2 "Use of undefined constant .."

Posted: Fri Nov 28, 2014 3:33 pm
by krot
I'm implementing google's reCAPTCHA V2. It works almost perfectly except for the following error located in the recaptchalib.php:

Notice: Use of undefined constant success - assumed 'success' in (script location)

https://github.com/google/ReCAPTCHA/blo ... chalib.php

Anyone got an idea how to fix this?

Re: google reCAPTCHA V2 "Use of undefined constant .."

Posted: Fri Nov 28, 2014 3:46 pm
by Celauran

Code: Select all

        if (trim($answers [success]) == true) {
should be

Code: Select all

        if (trim($answers ['success']) == true) {

Re: google reCAPTCHA V2 "Use of undefined constant .."

Posted: Fri Nov 28, 2014 3:52 pm
by krot
Celauran. Perfect. Thanks :D