Last modified: 2011-11-28 19:30:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T34659, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32659 - 'implode' in Language::commaList(), Language::semicolonList() and Language::pipeList() should use the proper argument order
'implode' in Language::commaList(), Language::semicolonList() and Language::p...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
1.20.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Brion Vibber
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-26 16:31 UTC by Daniel A. R. Werner
Modified: 2011-11-28 19:30 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
fixes error-causing usage of 'implode' in Language::commaList(), Language::semicolonList() and Language::pipeList() (1.43 KB, patch)
2011-11-26 16:31 UTC, Daniel A. R. Werner
Details

Description Daniel A. R. Werner 2011-11-26 16:31:08 UTC
Created attachment 9555 [details]
fixes error-causing usage of 'implode' in Language::commaList(), Language::semicolonList() and Language::pipeList()

Implode is not being used correctly in Language::commaList(), Language::semicolonList() and Language::pipeList(). This makes these functions 100% useless.
I just wanted to commit a patch but seems like I have no commit access for phase3 so here comes a patch.
Comment 1 db [inactive,noenotif] 2011-11-26 19:34:13 UTC
http://www.php.net/manual/en/function.implode.php

Note: 

implode() can, for historical reasons, accept its parameters in either order. For consistency with explode(), however, it may be less confusing to use the documented order of arguments.
Comment 2 Daniel A. R. Werner 2011-11-26 20:25:59 UTC
Uh, wasn't really aware of that before. When I've been using these functions for the first time I got an error message, just tuns out this wasn't the cause, everythings ok then.
Comment 3 Daniel Friesen 2011-11-27 05:12:05 UTC
I don't consider relying on bad historical behavior a good practice within MediaWiki. This bug should stay open until someone fixes the order of our arguments to implode.
Comment 4 Brion Vibber 2011-11-28 19:01:30 UTC
Assigning to self to review & apply.
Comment 5 Brion Vibber 2011-11-28 19:30:58 UTC
Looks fine, cleanup is good. :) Applied in r104473.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links