Index: trunk/extensions/AbuseFilter/AbuseFilter.parser.php |
— | — | @@ -833,6 +833,8 @@ |
834 | 834 | protected function funcCount( $args ) { |
835 | 835 | if( count( $args ) < 1 ) |
836 | 836 | throw new AFPExpection( "No params passed to ".__METHOD__ ); |
| 837 | + |
| 838 | + $offset = -1; |
837 | 839 | |
838 | 840 | if (count($args) == 1) { |
839 | 841 | $count = count( explode( ",", $args[0]->toString() ) ); |
— | — | @@ -841,7 +843,7 @@ |
842 | 844 | $haystack = $args[1]->toString(); |
843 | 845 | |
844 | 846 | $count = 0; |
845 | | - while ( ($offset = strpos( $haystack, $needle, $offset )) !== false ) { |
| 847 | + while ( ($offset = strpos( $haystack, $needle, $offset + 1 )) !== false ) { |
846 | 848 | $count++; |
847 | 849 | } |
848 | 850 | } |