]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/php/scheme.php
Use minimal mode to change site theme settings
[friendica.git] / view / theme / frio / php / scheme.php
index 02de0a0359675db5427073de134cee387e68d7c8..ddce673105e473320879d57b2ae066746f0753e5 100644 (file)
@@ -21,7 +21,7 @@ use Friendica\Core\PConfig;
 
 function get_scheme_info($scheme)
 {
-       $theme = current_theme();
+       $theme = get_app()->getCurrentTheme();
        $themepath = 'view/theme/' . $theme . '/';
        $scheme = PConfig::get(local_user(), 'frio', 'scheme', PConfig::get(local_user(), 'frio', 'scheme'));
 
@@ -44,7 +44,11 @@ function get_scheme_info($scheme)
                foreach ($ll as $l) {
                        $l = trim($l, "\t\n\r */");
                        if ($l != '') {
-                               list($k, $v) = array_map('trim', explode(':', $l, 2));
+                               $values = array_map('trim', explode(':', $l, 2));
+                               if (count($values) < 2) {
+                                       continue;
+                               }
+                               list($k, $v) = $values;
                                $k = strtolower($k);
                                if ($k == 'author') {
                                        $r = preg_match('|([^<]+)<([^>]+)>|', $v, $m);