Page MenuHomePhabricator

Catchable fatal error: Argument 1 passed to AbuseFilter::getEmergencyValue() must be of the type array, double given
Closed, InvalidPublic

Description

After updating an existing filter (the only one) in my local installation of MW from
+---------------------------------------+

false & false & false & false & false

+---------------------------------------+
to
+---------------------------------------+

'FILTRAR' in summary

+---------------------------------------+
I made an edit in the "Main page" with an empty summary, and then tried to do another edit with "FILTRAR" in the summary. I wasn't able to save this second edit, because after I clicked in the save button it showed a blank page with the following message:

Catchable fatal error: Argument 1 passed to AbuseFilter::getEmergencyValue() must be of the type array, double given, called in /var/www/w/extensions/AbuseFilter/AbuseFilter.class.php on line 1552 and defined in /var/www/w/extensions/AbuseFilter/AbuseFilter.class.php on line 1593

Just a few moments before the test above, I updated MW, AbuseFilter and all other extensions (git checkout master && git pull) and executed maintenance/update.php.


Version: master
Severity: normal

Details

Reference
bz52668

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:01 AM
bzimport added a project: AbuseFilter.
bzimport set Reference to bz52668.
bzimport added a subscriber: Unknown Object (MLST).

Pressing the "back" button in the browser and then clicking on save again caused the same error.

Each attempt to save the edit increased the number of actions in the line
"Of the last 5 actions, this filter has matched 0 (0.00%). On average, its run time is 0.23 ms, and it consumes 1 condition of the condition limit."
of the page Special:AbuseFilter/1

Created attachment 13079
Screenshot of Special:AbuseFilter/1, showing how the filter configuration

Even after the fatal errors, I was able to save edits which didn't contain the string "FILTRAR" in the summary. Besides, none of the failed edit attempts were logged at Special:AbuseLog.

In the screenshot, you see the current configuration of the filter (if that helps).

Attached:

Captura_de_tela_de_2013-08-09_08:42:14.png (768×1 px, 68 KB)

Never mind, this was caused by me using
$wgAbuseFilterEmergencyDisableThreshold = 0.95;
instead of
$wgAbuseFilterEmergencyDisableThreshold['default'] = 0.95;
in my LocalSettings.php.