mirror of
https://github.com/unraid/webgui.git
synced 2026-01-04 16:40:21 -06:00
refactor: add error handling for missing theme directory in ThemeHelper.php
This commit is contained in:
@@ -135,7 +135,13 @@ class ThemeHelper {
|
||||
*/
|
||||
public static function getThemesFromFileSystem(string $docroot): array {
|
||||
$themes = [];
|
||||
$themeFiles = glob("$docroot/webGui/styles/themes/*.css");
|
||||
$themePath = "$docroot/webGui/styles/themes";
|
||||
if (!is_dir($themePath)) {
|
||||
error_log("Theme directory not found: $themePath");
|
||||
return $themes;
|
||||
}
|
||||
|
||||
$themeFiles = glob("$themePath/*.css");
|
||||
|
||||
foreach ($themeFiles as $themeFile) {
|
||||
$themeName = basename($themeFile, '.css');
|
||||
|
||||
Reference in New Issue
Block a user