Page MenuHomePhabricator

abfstartid is not an integer
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:

Access https://en.wikipedia.org/w/api.php?action=query&list=abusefilters&abfprop=id%7Cdescription%7Cpattern

Actual Results:

"continue": {
    "abfstartid": "11",
    "continue": "-||"
},

Expected Results:

"continue": {
    "abfstartid": 11,
    "continue": "-||"
},

as documented:

abfstartid
The filter ID to start enumerating from.

Type: integer

Alternatively, correct the documentation.

Event Timeline

DannyS712 added a subscriber: DannyS712.

ApiQueryAbuseFilters::execute:
$entry['id'] = intval( $row->af_id );
$this->setContinueEnumParameter( 'startid', $row->af_id );

we should just apply intval

Change 553838 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/AbuseFilter@master] ApiQueryAbuseFilters: Return abfstartid as an integer

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

Change 553838 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] ApiQueryAbuseFilters: Return abfstartid as an integer

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