On Tue, May 27, 2008 at 11:10 AM, Roan Kattouw roan.kattouw@home.nl wrote:
You're not getting the point: you're forgetting about message parameters.
An error is formatted as follows: array('hookaborted', $error) for a message with parameters, or array('articleexists') for errors without parameters. An array of errors is therefore two levels deep: array(array('articleexists'), array('hookaborted', $err))
I know that. I think I was the one who suggested the format, for exactly that reason:
http://lists.wikimedia.org/pipermail/wikitech-l/2007-July/032172.html ((2) at the bottom)
My objection is that you should actually return all the errors. Rather than
- return 'badtitletext'; + return array(array('badtitletext'));
You should have
+ $errors []= array( 'badtitletext' );
and then once the whole function is through, return $errors (which would be empty, on no errors). There's no reason to rewrite the whole function to change its return type and then not using the new format properly.
If you don't want to fix it, maybe I will at some point. I'm just remarking that it would have been easier if you had done this while you were changing the function to begin with.