浏览代码

Array index off by 1

Thijs Kinkhorst 23 年之前
父节点
当前提交
90baf0034f
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/help.php

+ 2 - 2
src/help.php

@@ -139,7 +139,7 @@ if (file_exists("../help/$squirrelmail_language")) {
     echo "<br><center><font color=\"$color[2]\">" .
          _("Some or all of the help documents are not present!").
          '</font></center>'.
-         '</td></tr></table>';
+         '</td></tr></table></body></html>';
     /* this is really silly, because there may be some
      * footers. What about them.
      * TODO: Fix this so it's not just "exit".
@@ -171,7 +171,7 @@ if ($help_exists == true) {
     	$chapter = 0;
     }
 
-    if ( $chapter == 0 || !isset( $helpdir[$chapter] ) ) {
+    if ( $chapter == 0 || !isset( $helpdir[$chapter-1] ) ) {
         echo html_tag( 'table', '', 'center', '', 'cellpadding="0" cellspacing="0" border="0"' );
 	            html_tag( 'tr' ) .
                         html_tag( 'td' ) .