Index: trunk/extensions/NaturalLanguageList/NaturalLanguageList.php |
— | — | @@ -419,12 +419,13 @@ |
420 | 420 | * @param $array Array The array with values. |
421 | 421 | * @param $value Mixed The element to be verified. |
422 | 422 | * @param $intervals Boolean Whether intervals are allowed. |
| 423 | + * @return Boolean True on interval was A-OK, otherwise false. |
423 | 424 | */ |
424 | 425 | private static function handle_interval ( &$array, $value, $intervals ) { |
425 | 426 | global $wgNllMaxListLength; |
426 | 427 | if ( !$intervals ) |
427 | 428 | return false; |
428 | | - $tmp = explode ( "..", $value ); |
| 429 | + $tmp = explode ( "..", preg_replace( "/([0-9]+)\.\.+([0-9]+)/", '$1..$2', $value ) ); |
429 | 430 | if ( count( $tmp ) == 2 ) { |
430 | 431 | if ( is_numeric($tmp[0])===false or is_numeric($tmp[1])===false or ($tmp[0] > $tmp[1]) ) |
431 | 432 | return false; |