From 988e24f6cffee4243f5ec8415bd81448537ca799 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Sat, 28 Feb 2004 08:49:51 +0000 Subject: [PATCH] oops, need better error checking than that... git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6687 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/read_body.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/read_body.php b/src/read_body.php index 1d760c19..1189b6f7 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -694,11 +694,13 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp // echo rows, with hooks $ret = do_hook_function('read_body_menu_top', array($nav_row, $menu_row)); - if (!empty($ret[0])) { - $nav_row = $ret[0]; - } - if (!empty($ret[1])) { - $menu_row = $ret[1]; + if (is_array($ret)) { + if (isset($ret[0]) && !empty($ret[0])) { + $nav_row = $ret[0]; + } + if (isset($ret[1]) && !empty($ret[1])) { + $menu_row = $ret[1]; + } } echo ''; echo $nav_on_top ? $nav_row . $menu_row : $menu_row . $nav_row; -- 2.25.1