Make default theme actually work. #557313
[squirrelmail.git] / src / load_prefs.php
index fb2dd9e51dc4a29645a9061eca4b683cfc869006..457aef0e67539591f876ea53227cf533cf7c894b 100644 (file)
@@ -37,8 +37,8 @@ $chosen_theme = (!$found_theme ? '' : $chosen_theme);
 if (isset($chosen_theme) && $found_theme && (file_exists($chosen_theme))) {
     @include_once($chosen_theme);
 } else {
-    if (isset($theme) && isset($theme[0]) && file_exists($theme[0]['PATH'])) {
-        @include_once($theme[0]['PATH']);
+    if (isset($theme) && isset($theme[$theme_default]) && file_exists($theme[$theme_default]['PATH'])) {
+        @include_once($theme[$theme_default]['PATH']);
     } else {
         /**
          * This theme as a failsafe if no themes were found. It makes