mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-12-01 00:56:26 +00:00
03da29b9da
The abusefilter array test failed because length( ['a', 'b', 'c'] ) returned 12 instead of 6. That was du to it converted the array to a string with new line seperated values first before measuring the string length. Changed that behaviour to act like the php count() function or the python len() function which seems far more useful to me. The old behaviour can be established using length( string( array ) ). Change-Id: I16646891837c9743ca5af2dd328077a7225bb5f1
13 lines
337 B
Perl
13 lines
337 B
Perl
array1 := [ 'a', 'b', 'c', ];
|
|
array2 := [];
|
|
array2[] := 'd';
|
|
array2[] := 'g';
|
|
array2[] := 'f';
|
|
array2[1] := 'e';
|
|
|
|
array3 := array1 + array2;
|
|
array4 := [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
|
|
|
|
(string(array3) == "a\nb\nc\nd\ne\nf\n" & !('b' in array2) & array1 contains 'c' & [ false, !(1;0), null ][1] & length(array3) == 6 &
|
|
array4[1][1] == 5 )
|