Last modified: 2011-03-13 18:06:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 13764 - Database::makeList doesn't accept a non-array
Database::makeList doesn't accept a non-array
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
unspecified
All All
: Lowest trivial (vote)
: ---
Assigned To: Chad H.
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-16 14:12 UTC by Chad H.
Modified: 2011-03-13 18:06 UTC (History)
2 users (show)

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


Attachments
Patch against HEAD (408 bytes, patch)
2008-04-16 14:12 UTC, Chad H.
Details

Description Chad H. 2008-04-16 14:12:09 UTC
Created attachment 4823 [details]
Patch against HEAD

Currently, this method does not accept a non-array and throws an error. In r33324, Werdna made a change to GlobalBlocking to send a non-array as a single item array since this class won't handle it. As we (occasionally?) need to send non-arrays to it (not sure how often this happens elsewhere), it would make more sense to have the method take the non-array and turn it into an array (basically, Werdna's fix at the method level). Attached a patch.
Comment 1 Brion Vibber 2008-04-16 19:08:07 UTC
Why would we need to do this?
Comment 2 Roan Kattouw 2008-04-16 19:51:55 UTC
(In reply to comment #1)
> Why would we need to do this?
> 

Because other functions also have that interface? To provide a specific example, the first parameter to Database::select() can be both a string and an array. This is actually used a lot in the code: $dbr->select('page', ...) and $dbr->select(array('page', 'redirect')), ...)
Comment 3 Siebrand Mazeland 2008-08-18 20:41:39 UTC
Assigned: ^demon, who provided the patch. Suggest to go ahread after comment 2.
Comment 4 Chad H. 2008-08-19 00:25:11 UTC
On further thought, Brion is right on this. MakeList _should_ be passed a list (and barf heavily if it isn't). Why would you make a list of one item?

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


Navigation
Links