Simetrical schreef:
There is absolutely no point in using all this ugly array nesting if you never use arrays with more than one element. The entire idea of using arrays (ugly as all this nesting gets) is that you can return all errors that occur, instead of just returning the first error you notice. You only ever handle arrays of one element here, and in fact you explicitly ignore all others:
call_user_func_array(array($this, 'showForm'), $error[0]);
That really sort of defeats the point.
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.
Roan Kattouw (Catrope)