mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Don't trigger filter hits for nonexisting filter 0
AbuseFilter::getConsequencesForFilters uses filter ids as array keys, that causes problems if both local and global filters were hit, because array_merge reindexes arrays. Example: https://www.mediawiki.org/wiki/Special:AbuseLog/18687 Change-Id: I81cb110322461e30113199cfa313cd8e8e8b2262
This commit is contained in:
parent
243df103b3
commit
4cb9a96ac9
|
@ -641,10 +641,7 @@ class AbuseFilter {
|
|||
|
||||
if ( count( $globalFilters ) ) {
|
||||
$fdb = wfGetDB( DB_SLAVE, array(), $wgAbuseFilterCentralDB );
|
||||
$consequences = array_merge(
|
||||
$consequences,
|
||||
self::loadConsequencesFromDB( $fdb, $globalFilters, 'global-' )
|
||||
);
|
||||
$consequences = $consequences + self::loadConsequencesFromDB( $fdb, $globalFilters, 'global-' );
|
||||
}
|
||||
|
||||
return $consequences;
|
||||
|
|
Loading…
Reference in a new issue