mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 00:04:04 +02:00
StyleSheet: Handle missing themes gracefully
This commit is contained in:
parent
aa101e18c8
commit
fd4ab2babc
@ -181,8 +181,8 @@ class StyleSheet
|
||||
|
||||
$mode = 'none';
|
||||
if ($user = Auth::getInstance()->getUser()) {
|
||||
$file = $themePath !== null ? file_get_contents($themePath) : '';
|
||||
if ($file !== '' && ! preg_match(self::REGEX_ALL_MODE_QUERY, $file)) {
|
||||
$file = $themePath !== null ? @file_get_contents($themePath) : '';
|
||||
if ($file && $file !== '' && ! preg_match(self::REGEX_ALL_MODE_QUERY, $file)) {
|
||||
if (preg_match(self::REGEX_AUTO_MODE_QUERY, $file)) {
|
||||
$mode = 'system';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user