1
0
Fork 0

Fix frio settings display error setting scheme to custom type if null

This commit is contained in:
Hank Grabowski 2022-07-13 08:40:54 -04:00
parent ac56dcd50f
commit 74252b5a31

View file

@ -42,7 +42,7 @@ function get_scheme_info($scheme)
$theme = DI::app()->getCurrentTheme(); $theme = DI::app()->getCurrentTheme();
$themepath = 'view/theme/' . $theme . '/'; $themepath = 'view/theme/' . $theme . '/';
if (empty($scheme)) { if (empty($scheme)) {
$scheme = DI::pConfig()->get(local_user(), 'frio', 'scheme', DI::pConfig()->get(local_user(), 'frio', 'schema')); $scheme = DI::pConfig()->get(local_user(), 'frio', 'scheme', DI::pConfig()->get(local_user(), 'frio', 'schema', '---'));
} }
$scheme = Strings::sanitizeFilePathItem($scheme); $scheme = Strings::sanitizeFilePathItem($scheme);
@ -56,7 +56,9 @@ function get_scheme_info($scheme)
'accented' => false, 'accented' => false,
]; ];
if (!is_file($themepath . 'scheme/' . $scheme . '.php')) return $info; if (!is_file($themepath . 'scheme/' . $scheme . '.php')) {
return $info;
}
$f = file_get_contents($themepath . 'scheme/' . $scheme . '.php'); $f = file_get_contents($themepath . 'scheme/' . $scheme . '.php');