On Wed, Sep 17, 2008 at 3:27 AM, Andrew Garrett andrew@epstone.net 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 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.