Last modified: 2011-03-13 18:06:23 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.
Why would we need to do this?
(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')), ...)
Assigned: ^demon, who provided the patch. Suggest to go ahread after comment 2.
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?