PreferenceForm: Don't try to load missing themes
This commit is contained in:
parent
5756ebba1f
commit
aa101e18c8
|
@ -211,8 +211,9 @@ class PreferenceForm extends Form
|
|||
}
|
||||
|
||||
if (isset($formData['theme']) && $formData['theme'] !== StyleSheet::DEFAULT_THEME) {
|
||||
$file = file_get_contents(StyleSheet::getThemeFile($formData['theme']));
|
||||
if (! preg_match(StyleSheet::REGEX_ALL_MODE_QUERY, $file)) {
|
||||
$themeFile = StyleSheet::getThemeFile($formData['theme']);
|
||||
$file = $themeFile !== null ? @file_get_contents($themeFile) : false;
|
||||
if ($file && ! preg_match(StyleSheet::REGEX_ALL_MODE_QUERY, $file)) {
|
||||
$disabled = ['', 'light', 'system'];
|
||||
if (preg_match(StyleSheet::REGEX_AUTO_MODE_QUERY, $file)) {
|
||||
$value = 'system';
|
||||
|
|
Loading…
Reference in New Issue