From aeeac2249018c608c5f2f51e33e2593b5509e726 Mon Sep 17 00:00:00 2001 From: Daimona Eaytoy Date: Tue, 10 Apr 2018 13:28:34 +0200 Subject: [PATCH] Fix parameter order for AbuseFilterParser::contains Move optional parameters after required ones. Change-Id: Ice243bc5c793ffe6323931e45f36939d4b428b30 --- includes/parser/AbuseFilterParser.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/parser/AbuseFilterParser.php b/includes/parser/AbuseFilterParser.php index 8a8ad1778..50f8dddc0 100644 --- a/includes/parser/AbuseFilterParser.php +++ b/includes/parser/AbuseFilterParser.php @@ -1139,7 +1139,7 @@ class AbuseFilterParser { $s = array_shift( $args ); - return new AFPData( AFPData::DBOOL, self::contains( true, $s, $args ) ); + return new AFPData( AFPData::DBOOL, self::contains( $s, $args, true ) ); } /** @@ -1158,7 +1158,7 @@ class AbuseFilterParser { $s = array_shift( $args ); - return new AFPData( AFPData::DBOOL, self::contains( false, $s, $args, false ) ); + return new AFPData( AFPData::DBOOL, self::contains( $s, $args, false, false ) ); } /** @@ -1179,7 +1179,7 @@ class AbuseFilterParser { $s = array_shift( $args ); - return new AFPData( AFPData::DBOOL, self::contains( true, $s, $args, true ) ); + return new AFPData( AFPData::DBOOL, self::contains( $s, $args, true, true ) ); } /** @@ -1200,7 +1200,7 @@ class AbuseFilterParser { $s = array_shift( $args ); - return new AFPData( AFPData::DBOOL, self::contains( false, $s, $args, true ) ); + return new AFPData( AFPData::DBOOL, self::contains( $s, $args, false, true ) ); } /** @@ -1211,14 +1211,14 @@ class AbuseFilterParser { * Use normalize = true to make use of ccnorm and * normalize both sides of the search. * - * @param bool $is_any * @param AFPData $string * @param AFPData[] $values + * @param bool $is_any * @param bool $normalize * * @return bool */ - protected static function contains( $is_any = true, $string, $values, $normalize = false ) { + protected static function contains( $string, $values, $is_any = true, $normalize = false ) { $string = $string->toString(); if ( $string == '' ) { return false;