mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-27 17:40:11 +00:00
ReCaptchaNoCaptcha: Fix function call on a non-object
$info is a Status object, but the function logCheckError called getErrorsArray() on $status (which is an undefined variable), thus it threw an exception. Change-Id: I93a52f31134a849e064945b653a13392b2f92d08
This commit is contained in:
parent
dd15a63695
commit
51c3903005
|
@ -50,13 +50,14 @@ HTML;
|
|||
|
||||
protected function logCheckError( $info ) {
|
||||
if ( $info instanceof Status ) {
|
||||
$errors = $status->getErrorsArray();
|
||||
$errors = $info->getErrorsArray();
|
||||
$error = $errors[0][0];
|
||||
} elseif ( is_array( $info ) ) {
|
||||
$error = implode( ',', $info );
|
||||
} else {
|
||||
$error = $info;
|
||||
}
|
||||
|
||||
wfDebugLog( 'captcha', 'Unable to validate response: ' . $error );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue