Module: appdb Branch: master Commit: e3ea460e9c5c7637992e3dbf0d94f3f3faabeb9f URL: http://source.winehq.org/git/appdb.git/?a=commit;h=e3ea460e9c5c7637992e3dbf0...
Author: Jeremy Newman jnewman@codeweavers.com Date: Fri Feb 8 13:18:29 2008 -0600
fix when session messages are empty
---
include/incl.php | 18 ++++++++++-------- 1 files 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 "<div align="center" style="font-color:{$msg['color']};"> {$msg['msg']} </div>"; + echo html_frame_start("","300","",5); + foreach ($GLOBALS['session']->msg as $msg) + { + if ($msg['color'] == "red") + $msg['color'] = "{$msg['color']};text-decoration:blink"; + echo "<div align="center" style="font-color:{$msg['color']};"> {$msg['msg']} </div>"; + } + echo html_frame_end(" "); + echo "<br>\n"; } - echo html_frame_end(" "); - echo "<br>\n"; }
/**