Page MenuHomePhabricator

Error when importing filter: Object does not implement ArrayAccess
Closed, ResolvedPublicBUG REPORT

Description

Steps to reproduce:
Go to https://en.wikipedia.beta.wmflabs.org/wiki/Special:AbuseFilter/import
Attempt to import the filter code below (code from https://commons.wikimedia.org/wiki/Commons:File_renaming/Global_replace)

{"row":{"af_id":"148","af_pattern":"(action === 'edit')\r\n\u0026 !('autopatrol' in user_rights)\r\n\u0026 (summary rlike '^\\(\\[\\[c\\:GR\\|GR\\]\\]\\)')","af_user":"16603","af_user_text":"Rillke","af_timestamp":"20150201145938","af_enabled":"1","af_comments":"Prevent non-autopatrolled users from replacing files on this wiki.\r\nReference: https://commons.wikimedia.org/wiki/Commons:File_renaming/Global_replace/Abuse_Filter","af_public_comments":"Disallow Commons Global Replace","af_hidden":"0","af_hit_count":"2","af_throttled":"0","af_deleted":"0","af_actions":"disallow","af_global":"0","af_group":"default"},"actions":{"disallow":{"action":"disallow","parameters":[""]}}}

Actual result:
PHP fatal error: Object does not implement ArrayAccess

Expected result:
Filter imports

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald Transcript
DannyS712 changed the subtype of this task from "Task" to "Bug Report".Aug 17 2019, 1:06 AM

Change 530699 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Fix object to array cast, typehint array params

https://gerrit.wikimedia.org/r/530699

Change 530699 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Fix object to array cast, typehint array params

https://gerrit.wikimedia.org/r/530699