Unbreak EmergencyDisable

FilterProfiler::getFilterProfile returns data in a different
format than the data is really stored.

Bug: T266531
Change-Id: I0d961a1ae67769da61f841df2462d47f81849972
This commit is contained in:
Matěj Suchánek 2020-10-27 10:07:15 +01:00
parent 2f5566d624
commit be0268f200

View file

@ -1197,7 +1197,7 @@ class AbuseFilterRunner {
$maxAge = AbuseFilter::getEmergencyValue( 'age', $this->group );
$filterProfile = $this->filterProfiler->getFilterProfile( $filter );
$matchCount = ( $filterProfile['matches'] ?? 0 ) + 1;
$matchCount = ( $filterProfile[1] ?? 0 ) + 1;
// Figure out if the filter is subject to being throttled.
$filterAge = (int)wfTimestamp( TS_UNIX, AbuseFilter::getFilter( $filter )->af_timestamp );