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