Index: trunk/phase3/includes/api/ApiResult.php |
— | — | @@ -246,7 +246,7 @@ |
247 | 247 | |
248 | 248 | /** |
249 | 249 | * Add value to the output data at the given path. |
250 | | - * Path is an indexed array, each element specifing the branch at which to add the new value |
| 250 | + * Path is an indexed array, each element specifying the branch at which to add the new value |
251 | 251 | * Setting $path to array('a','b','c') is equivalent to data['a']['b']['c'] = $value |
252 | 252 | * If $name is empty, the $value is added as a next list element data[] = $value |
253 | 253 | * @return bool True if $value fits in the result, false if not |
Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -682,8 +682,8 @@ |
683 | 683 | $max = isset ( $paramSettings[self::PARAM_MAX] ) ? $paramSettings[self::PARAM_MAX] : null; |
684 | 684 | |
685 | 685 | if ( !is_null( $min ) || !is_null( $max ) ) { |
686 | | - $values = is_array( $value ) ? $value : array( $value ); |
687 | | - foreach ( $values as &$v ) { |
| 686 | + $value = is_array( $value ) ? $value : array( $value ); |
| 687 | + foreach ( $value as &$v ) { |
688 | 688 | $this->validateLimit( $paramName, $v, $min, $max ); |
689 | 689 | } |
690 | 690 | } |