Can you explain in which way your function is better than original CHtml::errorSummary one? I found that you only removed $htmlOptions support and you are returning pure contents where original function returns them nicely formatted inside div tag.
Both changes are making your function less useful than original one, but I might be missing something.
Thanks! But still… wouldn’t it be easier to simply strip_tags on what original CHtml::errorSummary() returns, than to employ (write) own class for this purpose?
Yes this looks like it’s for logs. This works excellent for what I needed to log errors in my cron jobs. I think we can make a more generalized version of this though which handles all similar situations. Here is my first attempt (based on more current code) which I believe should be compatible with the current calls:
If using sprintf to insert the content of the messages is, for some reason, not fast enough you could improve performance by getting rid of $containerFormat and just adding that formatting to the end of $header and start of $footer but that would break some current stuff most likely.