aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Theme_info.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-10-23 14:02:19 +0200
committerMario Vavti <mario@mariovavti.com>2022-10-23 14:02:19 +0200
commit8879776d6436ed5257648a1873ddaa9486b25070 (patch)
tree996c192607ed8b1a4b03bd620deb4b1f3b348a48 /Zotlabs/Module/Theme_info.php
parent5edd13c6bb89c7434d8437f8cc74c038371fdbf8 (diff)
downloadvolse-hubzilla-8879776d6436ed5257648a1873ddaa9486b25070.tar.gz
volse-hubzilla-8879776d6436ed5257648a1873ddaa9486b25070.tar.bz2
volse-hubzilla-8879776d6436ed5257648a1873ddaa9486b25070.zip
fix php warnings
Diffstat (limited to 'Zotlabs/Module/Theme_info.php')
-rw-r--r--Zotlabs/Module/Theme_info.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/Zotlabs/Module/Theme_info.php b/Zotlabs/Module/Theme_info.php
index e27ec9444..bf1e5cb9b 100644
--- a/Zotlabs/Module/Theme_info.php
+++ b/Zotlabs/Module/Theme_info.php
@@ -9,7 +9,7 @@ class Theme_info extends \Zotlabs\Web\Controller {
$theme = argv(1);
if(! $theme)
killme();
-
+
$schemalist = array();
$theme_config = "";
@@ -40,32 +40,32 @@ class Theme_info extends \Zotlabs\Web\Controller {
$credits = '';
}
- $ret = [
- 'theme' => $theme,
- 'img' => get_theme_screenshot($theme),
- 'desc' => $desc,
- 'version' => $version,
- 'credits' => $credits,
+ $ret = [
+ 'theme' => $theme,
+ 'img' => get_theme_screenshot($theme),
+ 'desc' => $desc,
+ 'version' => $version,
+ 'credits' => $credits,
'schemas' => $schemalist,
'config' => $theme_config
];
json_return_and_die($ret);
-
+
}
function get_theme_config_file($theme){
- $base_theme = \App::$theme_info['extends'];
-
- if (file_exists("view/theme/$theme/php/config.php")){
+ $base_theme = \App::$theme_info['extends'] ?? '';
+
+ if ($theme && file_exists("view/theme/$theme/php/config.php")){
return "view/theme/$theme/php/config.php";
- }
- if (file_exists("view/theme/$base_theme/php/config.php")){
+ }
+ if ($base_theme && file_exists("view/theme/$base_theme/php/config.php")){
return "view/theme/$base_theme/php/config.php";
}
return null;
}
-} \ No newline at end of file
+}