Reorganise files in ConfirmEdit
[toast/cookiecaptcha.git] / QuestyCaptcha.class.php
index 16dff06c99dac8eef04c82cc9f11ff2cf111df1e..478fcf3480729b628c8350f4bffbb7f096d3590f 100644 (file)
@@ -12,7 +12,11 @@ class QuestyCaptcha extends SimpleCaptcha {
 
        /** Validate a captcha response */
        function keyMatch( $answer, $info ) {
-               return strtolower( $answer ) == strtolower( $info['answer'] );
+               if ( is_array( $info['answer'] ) ) {
+                       return in_array( strtolower( $answer ), $info['answer'] );
+               } else {
+                       return strtolower( $answer ) == strtolower( $info['answer'] );
+               }
        }
 
        function addCaptchaAPI( &$resultArr ) {