Actually make the validation of the range occur
Fix typo in ApiBase.php
$max = isset ( $paramSettings[self::PARAM_MAX] ) ? $paramSettings[self::PARAM_MAX] : null;
if ( !is_null( $min ) || !is_null( $max ) ) {
- $values = is_array( $value ) ? $value : array( $value );
- foreach ( $values as &$v ) {
+ $value = is_array( $value ) ? $value : array( $value );
+ foreach ( $value as &$v ) {
$this->validateLimit( $paramName, $v, $min, $max );
}
}
/**
* Add value to the output data at the given path.
- * Path is an indexed array, each element specifing the branch at which to add the new value
+ * Path is an indexed array, each element specifying the branch at which to add the new value
* Setting $path to array('a','b','c') is equivalent to data['a']['b']['c'] = $value
* If $name is empty, the $value is added as a next list element data[] = $value
* @return bool True if $value fits in the result, false if not