Page MenuHomePhabricator

Expand AFPData::toNumber to return DINT for other int-like types
Open, Needs TriagePublic

Description

E.g. bool or null, see here.

Details

Related Gerrit Patches:
mediawiki/extensions/AbuseFilter : masterTweak the result of unary minus on non-numbers, expand int-like list
mediawiki/extensions/AbuseFilter : masterExpand the list of types that can be cast to int

Event Timeline

Daimona created this task.Nov 7 2019, 11:12 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 7 2019, 11:12 AM

Change 549467 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Expand the list of types that can be cast to int

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

Daimona claimed this task.Nov 7 2019, 2:15 PM

Change 549467 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Expand the list of types that can be cast to int

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

Nullzero closed this task as Resolved.Nov 10 2019, 11:10 AM

@Daimona what about array and string? String will be tricky though because it could be "1.2" which should be converted to float.

Daimona reopened this task as Open.Nov 13 2019, 1:39 PM
Daimona removed Daimona as the assignee of this task.

@Daimona what about array and string? String will be tricky though because it could be "1.2" which should be converted to float.

Hm, well, we could add those as well. As for strings... We should cast '1.2' to float, '123' to int, and '1.0' to float. It shouldn't be super-hard. Re-opening, although I cannot patch this right now.

Change 548972 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Tweak the result of unary minus on non-numbers, expand int-like list

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