Page MenuHomePhabricator

Using incorrect array parameter syntax does not raise an error/warning
Closed, ResolvedPublic

Details

Reference
bz64057

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:14 AM
bzimport set Reference to bz64057.

Change 126990 had a related patch set uploaded by Anomie:
API: Warn when unsupported PHP array syntax is used

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

These URLs are produced by mw.Api when as array is passed as argument:

new mw.Api().get( { action: 'query', prop: 'globalusage', titles: 'File: Swallow flying drinking.jpg', guprop: ['url', 'namespace'], gufilterlocal: 1} );

as opposed to

new mw.Api().get( { action: 'query', prop: 'globalusage', titles: 'File: Swallow flying drinking.jpg', guprop: 'url|namespace', gufilterlocal: 1} );

Not sure if this is a bug or a feature, but it is very counterintuitive.

(In reply to Tisza Gergő from comment #2)

These URLs are produced by mw.Api when as array is passed as argument:

[...]

Not sure if this is a bug or a feature, but it is very counterintuitive.

If it's a bug, it should be filed as a separate bug against the JavaScript component. You might refer to bug 10262 when doing so.

Change 126990 merged by jenkins-bot:
API: Warn when unsupported PHP array syntax is used

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

Should be deployed to WMF wikis with 1.24wmf3, see https://www.mediawiki.org/wiki/MediaWiki_1.24/Roadmap for the schedule.