Merge "Fix missing variable in HTMLFormField exceptions"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 1 Apr 2016 13:49:40 +0000 (13:49 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 1 Apr 2016 13:49:40 +0000 (13:49 +0000)
includes/htmlform/HTMLFormField.php

index a9c7632..4c8ce82 100644 (file)
@@ -179,7 +179,7 @@ abstract class HTMLFormField {
                                        return true;
 
                                case 'OR':
-                                       foreach ( $params as $p ) {
+                                       foreach ( $params as $i => $p ) {
                                                if ( !is_array( $p ) ) {
                                                        throw new MWException(
                                                                "Expected array, found " . gettype( $p ) . " at index $i"
@@ -205,7 +205,7 @@ abstract class HTMLFormField {
                                        return false;
 
                                case 'NOR':
-                                       foreach ( $params as $p ) {
+                                       foreach ( $params as $i => $p ) {
                                                if ( !is_array( $p ) ) {
                                                        throw new MWException(
                                                                "Expected array, found " . gettype( $p ) . " at index $i"