]> git.mxchange.org Git - friendica.git/blobdiff - src/App.php
Several more warnings ... (#5340)
[friendica.git] / src / App.php
index a2bdd03df6c1801f1836f8edb5f9fd68eb883adc..097b5e541dc97d69e23ad89fb69fa6d70f3d9d77 100644 (file)
@@ -174,7 +174,21 @@ class App
                $this->callstack['parser'] = [];
 
                $this->config = [];
-               $this->page = [];
+
+               $this->page = [
+                       'aside' => '',
+                       'bottom' => '',
+                       'content' => '',
+                       'end' => '',
+                       'footer' => '',
+                       'htmlhead' => '',
+                       'nav' => '',
+                       'page_title' => '',
+                       'right_aside' => '',
+                       'template' => '',
+                       'title' => ''
+               ];
+
                $this->pager = [];
 
                $this->query_string = '';
@@ -1154,7 +1168,12 @@ class App
                        }
                }
 
-               $user_theme = defaults($_SESSION, 'theme', $system_theme);
+               if (!empty($_SESSION)) {
+                       $user_theme = defaults($_SESSION, 'theme', $system_theme);
+               } else {
+                       $user_theme = $system_theme;
+               }
+
                // Specific mobile theme override
                if (($this->is_mobile || $this->is_tablet) && defaults($_SESSION, 'show-mobile', true)) {
                        $system_mobile_theme = Config::get('system', 'mobile-theme');