Index: trunk/extensions/Arrays/RELEASE-NOTES |
— | — | @@ -6,6 +6,7 @@ |
7 | 7 | - '{{#arraydefine: a |}}' will create an empty array instead of an array with an empty element as in |
8 | 8 | version 1.3.2. A new option 'singleempty' can be used to avoid this behavior, ',' can be used to |
9 | 9 | create an array with two empty elements. |
| 10 | + - Bug fixed where '#arraysearch' would always return '-1' instead of parameter 5 value. |
10 | 11 | |
11 | 12 | * December 5, 2011 -- Version 2.0rc2 |
12 | 13 | - Bug introduced in r105069 fixed where '#arrayprint' was broken in compatibility mode in some cases. |
Index: trunk/extensions/Arrays/Arrays.php |
— | — | @@ -500,12 +500,15 @@ |
501 | 501 | } |
502 | 502 | } |
503 | 503 | |
504 | | - global $egArraysCompatibilityMode; |
505 | | - |
506 | 504 | // no match! (Expand only when needed!) |
507 | | - $no = isset( $args[4] ) |
508 | | - ? trim( $frame->expand( $args[4] ) ) |
509 | | - : $egArraysCompatibilityMode ? '-1' : ''; // COMPATIBILITY-MODE |
| 505 | + if( isset( $args[4] ) ) { |
| 506 | + $no = trim( $frame->expand( $args[4] ) ); |
| 507 | + } else { |
| 508 | + global $egArraysCompatibilityMode; |
| 509 | + $no = $egArraysCompatibilityMode |
| 510 | + ? '-1' // COMPATIBILITY-MODE |
| 511 | + : ''; |
| 512 | + } |
510 | 513 | return $no; |
511 | 514 | } |
512 | 515 | |