mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-27 17:40:11 +00:00
Merge "Make Questy answers in arrays case-insensitive"
This commit is contained in:
commit
e65a194347
|
@ -13,7 +13,7 @@ class QuestyCaptcha extends SimpleCaptcha {
|
|||
/** Validate a captcha response */
|
||||
function keyMatch( $answer, $info ) {
|
||||
if ( is_array( $info['answer'] ) ) {
|
||||
return in_array( strtolower( $answer ), $info['answer'] );
|
||||
return in_array( strtolower( $answer ), array_map( 'strtolower', $info['answer'] ) );
|
||||
} else {
|
||||
return strtolower( $answer ) == strtolower( $info['answer'] );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue