Merge "API param validation: Set strict mode for in_array"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 2 Apr 2013 17:59:20 +0000 (17:59 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 2 Apr 2013 17:59:20 +0000 (17:59 +0000)
includes/api/ApiBase.php

index 741e908..84a6ed9 100644 (file)
@@ -1081,7 +1081,7 @@ abstract class ApiBase extends ContextSource {
 
                if ( !$allowMultiple && count( $valuesList ) != 1 ) {
                        // Bug 33482 - Allow entries with | in them for non-multiple values
-                       if ( in_array( $value, $allowedValues ) ) {
+                       if ( in_array( $value, $allowedValues, true ) ) {
                                return $value;
                        }