#333 Nicer output for Messages

open
nobody
None
5
2012-09-25
2009-12-07
No

When a message has to be displayed and it is an array, as when all comments are deleted for a user, then this is showed to the user with a print_r, which let the user think it is some debug ouptut left over.
See this:
http://www.frxoops.org/modules/newbb/viewtopic.php?post_id=189553#forumpost189553

The displaying is done in /include functions.php
function xoops_error($msg, $title = '')
{
echo '

';
if ($title != '') {
echo '' . $title . '
';
}
if (is_array($msg) || is_object($msg)) {
echo "
";
print_r($msg);
echo "
";
} else {
echo "
{$msg}
";
}
echo '
';
}

If it is an array of messages, they should be showed in a nice list in stead of dumped.
(Kind of loop with intermediate
)
If it is an object, would it be to match asked that the object contains a function to render itself (its messages)?
Then there could be something like
echo "

{$msg.render_msg()}
";

Discussion