forked from GithubBackups/tinyib
Resolve PHP compatibility issue, fixes #29
This commit is contained in:
parent
b2c0b69947
commit
e783877676
@ -236,7 +236,14 @@ function checkCAPTCHA() {
|
|||||||
|
|
||||||
if ($failed_captcha) {
|
if ($failed_captcha) {
|
||||||
$captcha_error = '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".';
|
$captcha_error .= ' Please click the checkbox labeled "I\'m not a robot".';
|
||||||
} else {
|
} else {
|
||||||
$captcha_error .= ' Reason:';
|
$captcha_error .= ' Reason:';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user