Index: trunk/extensions/Arrays/RELEASE-NOTES |
— | — | @@ -17,6 +17,7 @@ |
18 | 18 | + See 1.4 alpha for previous changes |
19 | 19 | - If 'Regex Fun' extension is installed, '#arraysearcharray' can use Regex Funs 'e' flag feature |
20 | 20 | for transforming the result and at the same time parsing them after each back-reference inclusion. |
| 21 | + - 1.4 alpha bug solved, '#arraysearcharray' with empty string as start index was interpreted as 0 |
21 | 22 | |
22 | 23 | |
23 | 24 | * November 20, 2001 -- Version 1.4 alpha (r103716) |
Index: trunk/extensions/Arrays/Arrays.php |
— | — | @@ -472,7 +472,7 @@ |
473 | 473 | $arrayId = null, |
474 | 474 | $needle = '/^(\s*)$/', |
475 | 475 | $index = 0, |
476 | | - $limit = -1, |
| 476 | + $limit = '', |
477 | 477 | $transform = '' |
478 | 478 | ) { |
479 | 479 | $store = self::get( $parser ); |
— | — | @@ -496,8 +496,8 @@ |
497 | 497 | return ''; |
498 | 498 | } |
499 | 499 | |
500 | | - // non-numeric limit will be set to 0 |
501 | | - $limit = (int)$limit; |
| 500 | + // non-numeric limit will be set to 0, except limit was omitted ('') |
| 501 | + $limit = $limit === '' ? -1 : (int)$limit; |
502 | 502 | if( $limit === 0 ) { |
503 | 503 | return ''; |
504 | 504 | } |