Aryeh Gregor wrote:
Andrew Garrett wrote:
I spoke to the people in ##php, and supposedly, this is expected behaviour. They suggested we use in_array with 'true' as the final parameter, which uses ===.
There's usually no point in speaking with the people in ##php about things like this. The entire language is broken by design.
I've found ##php to be really useful if you feel like ranting and want an audience who will have almost, but not quite, no clue about what you're talking about. For complex design decisions, you're better off asking in #mediawiki.
I've done this in r40946. For those working on a revision BEFORE this one, PLEASE be careful. Double-check that you've assigned group permissions with $wgGroupPermissions['user']['right'] = true, rather than the (wrong) version I've used.
Maybe it would be better to handle this case as "do what I mean" instead of dropping the rights assignment. I.e., check the array for numeric keys with string values, and add those on to the array properly.
Or throw an exception, that would be a reasonable response to configuration errors.
-- Tim Starling