From e3ea460e9c5c7637992e3dbf0d94f3f3faabeb9f Mon Sep 17 00:00:00 2001 From: Jeremy Newman Date: Fri, 8 Feb 2008 13:18:29 -0600 Subject: [PATCH] fix when session messages are empty --- include/incl.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/include/incl.php b/include/incl.php index b66f103..4bef0e0 100644 --- a/include/incl.php +++ b/include/incl.php @@ -268,16 +268,18 @@ function purgeSessionMessages() function dumpmsgbuffer() { $GLOBALS['session']->dumpmsgbuffer(); - - echo html_frame_start("","300","",5); - foreach ($GLOBALS['session']->msg as $msg) + if (is_array($GLOBALS['session']->msg) and count($GLOBALS['session']->msg) > 0) { - if ($msg['color'] == "red") - $msg['color'] = "{$msg['color']};text-decoration:blink"; - echo "
{$msg['msg']}
"; + echo html_frame_start("","300","",5); + foreach ($GLOBALS['session']->msg as $msg) + { + if ($msg['color'] == "red") + $msg['color'] = "{$msg['color']};text-decoration:blink"; + echo "
{$msg['msg']}
"; + } + echo html_frame_end(" "); + echo "
\n"; } - echo html_frame_end(" "); - echo "
\n"; } /**