Explorar el Código

Check for Nulls

Andy hace 5 años
padre
commit
255174ac58
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  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,
      * 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')) {
         return;
     }

+ 1 - 1
src/login.php

@@ -86,7 +86,7 @@ $header = "<script type=\"text/javascript\">\n" .
           "// -->\n".
           "</script>\n";
 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']);
 
 if (! isset($color) || ! is_array($color)) {