Browse Source

Check for Nulls

Andy 5 years ago
parent
commit
255174ac58
2 changed files with 2 additions and 2 deletions
  1. 1 1
      plugins/filters/filters.php
  2. 1 1
      src/login.php

+ 1 - 1
plugins/filters/filters.php

@@ -216,7 +216,7 @@ function start_filters($hook_args) {
      * check hook that calls filtering. If filters are called by right_main_after_header,
      * check hook that calls filtering. If filters are called by right_main_after_header,
      * do filtering only when we are in INBOX folder.
      * do filtering only when we are in INBOX folder.
      */
      */
-    if ($hook_args[0]=='right_main_after_header' &&
+    if ($hook_args !== null && $hook_args[0]=='right_main_after_header' &&
         (sqgetGlobalVar('mailbox',$mailbox,SQ_FORM) && $mailbox!='INBOX')) {
         (sqgetGlobalVar('mailbox',$mailbox,SQ_FORM) && $mailbox!='INBOX')) {
         return;
         return;
     }
     }

+ 1 - 1
src/login.php

@@ -86,7 +86,7 @@ $header = "<script type=\"text/javascript\">\n" .
           "// -->\n".
           "// -->\n".
           "</script>\n";
           "</script>\n";
 global $theme, $theme_default;
 global $theme, $theme_default;
-if (@file_exists($theme[$theme_default]['PATH']))
+if ($theme !== null && in_array($theme_default, $theme) && @file_exists($theme[$theme_default]['PATH']))
    @include ($theme[$theme_default]['PATH']);
    @include ($theme[$theme_default]['PATH']);
 
 
 if (! isset($color) || ! is_array($color)) {
 if (! isset($color) || ! is_array($color)) {