Explorar o código

oops, need better error checking than that...

pdontthink %!s(int64=21) %!d(string=hai) anos
pai
achega
44742b0fbd
Modificáronse 1 ficheiros con 7 adicións e 5 borrados
  1. 7 5
      src/read_body.php

+ 7 - 5
src/read_body.php

@@ -694,11 +694,13 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
 
 
     // echo rows, with hooks
     // echo rows, with hooks
     $ret = do_hook_function('read_body_menu_top', array($nav_row, $menu_row));
     $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 '<table width="100%" cellpadding="3" cellspacing="0" align="center" border="0">';
     echo '<table width="100%" cellpadding="3" cellspacing="0" align="center" border="0">';
     echo $nav_on_top ? $nav_row . $menu_row : $menu_row . $nav_row;
     echo $nav_on_top ? $nav_row . $menu_row : $menu_row . $nav_row;