Resolve PHP compatibility issue, fixes #29
This commit is contained in:
parent
b2c0b69947
commit
e783877676
1 changed files with 8 additions and 1 deletions
|
@ -236,7 +236,14 @@ function checkCAPTCHA() {
|
|||
|
||||
if ($failed_captcha) {
|
||||
$captcha_error = 'Failed CAPTCHA.';
|
||||
if (count($resp->getErrorCodes()) == 1 && $resp->getErrorCodes()[0] == 'missing-input-response') {
|
||||
$error_reason = '';
|
||||
|
||||
if (count($resp->getErrorCodes()) == 1) {
|
||||
$error_codes = $resp->getErrorCodes();
|
||||
$error_reason = $error_codes[0];
|
||||
}
|
||||
|
||||
if ($error_reason == 'missing-input-response') {
|
||||
$captcha_error .= ' Please click the checkbox labeled "I\'m not a robot".';
|
||||
} else {
|
||||
$captcha_error .= ' Reason:';
|
||||
|
|
Loading…
Reference in a new issue