Bug 19604, backwards-compatibility issues with AbuseFilter count() function.

This commit is contained in:
Andrew Garrett 2009-07-17 16:55:31 +00:00
parent 94a9b2b174
commit 2eafa9bd66

View file

@ -1301,14 +1301,6 @@ class AbuseFilterParser {
if( $args[0]->type == AFPData::DList && count( $args ) == 1 ) {
return new AFPData( AFPData::DInt, count( $args[0]->data ) );
} elseif( count( $args ) > 1 && $args[1]->type == AFPData::DList ) {
$needle = $args[0];
$haystack = $args[1]->toList();
$count = 0;
foreach( $haystack as $item )
if( AFPData::equals( $needle, $item ))
$count++;
return new AFPData( AFPData::DInt, $count );
}
$offset = -1;