Simetrical schreef:
On Tue, May 27, 2008 at 11:02 AM, Roan Kattouw roan.kattouw@home.nl wrote:
At least one level of arrays was necessary to be able to return parameters to messages (only 'hookaborted' uses this right now, but there could be others in the future). I agree that the second level isn't really *necessary*, but I added it for uniformity with getUserPermissionsErrors() and all those other functions that return these nested arrays. Stuff kind of gets confusing when one function returns one level while another returns two levels.
This should return one level but return all applicable errors, then.
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))
Roan Kattouw (Catrope)