Merge "Make Questy answers in arrays case-insensitive"

This commit is contained in:
jenkins-bot 2015-06-13 00:00:31 +00:00 committed by Gerrit Code Review
commit e65a194347

View file

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