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:
Southparkfan 2015-10-19 12:49:56 +02:00
parent dd15a63695
commit 51c3903005

View file

@ -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 );
}