Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -727,18 +727,18 @@ |
728 | 728 | $enforceLimits = isset ( $paramSettings[self::PARAM_RANGE_ENFORCE] ) |
729 | 729 | ? $paramSettings[self::PARAM_RANGE_ENFORCE] : false; |
730 | 730 | |
731 | | - if ( !is_null( $min ) || !is_null( $max ) ) { |
732 | | - if ( is_array( $value ) ) { |
733 | | - $value = array_map( 'intval', $value ); |
| 731 | + if ( is_array( $value ) ) { |
| 732 | + $value = array_map( 'intval', $value ); |
| 733 | + if ( !is_null( $min ) || !is_null( $max ) ) { |
734 | 734 | foreach ( $value as &$v ) { |
735 | 735 | $this->validateLimit( $paramName, $v, $min, $max, null, $enforceLimits ); |
736 | 736 | } |
737 | | - } else { |
738 | | - $value = intval( $value ); |
739 | | - $this->validateLimit( $paramName, $value, $min, $max, null, $enforceLimits ); |
740 | 737 | } |
741 | 738 | } else { |
742 | 739 | $value = intval( $value ); |
| 740 | + if ( !is_null( $min ) || !is_null( $max ) ) { |
| 741 | + $this->validateLimit( $paramName, $value, $min, $max, null, $enforceLimits ); |
| 742 | + } |
743 | 743 | } |
744 | 744 | break; |
745 | 745 | case 'limit': |