Skip to content

Commit

Permalink
System Styles, fix error, on syste styles not loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Amstutz committed Apr 2, 2024
1 parent 7f0d278 commit b3c8aab
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Services/Style/System/classes/class.ilStyleDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@ public static function getCurrentSkin(): ?string
)) {
$skin_id = $DIC->user()->skin;
if ($skin_id && !self::skinExists($skin_id)) {
$messages = new ilSystemStyleMessageStack($DIC->ui()->mainTemplate());
$message_text = $DIC->language()->txt('set_skin_does_not_exist') . ' ' . $skin_id;
$messages->addMessage(new ilSystemStyleMessage($message_text, ilSystemStyleMessage::TYPE_ERROR));
$messages->sendMessages();
if($DIC->isDependencyAvailable('systemStyle')) {
$messages = new ilSystemStyleMessageStack($DIC->ui()->mainTemplate());
$message_text = $DIC->language()->txt('set_skin_does_not_exist') . ' ' . $skin_id;
$messages->addMessage(new ilSystemStyleMessage($message_text, ilSystemStyleMessage::TYPE_ERROR));
$messages->sendMessages();
}
$skin_id = $system_style_conf->getDefaultSkinId();
}
return $skin_id;
Expand Down

0 comments on commit b3c8aab

Please sign in to comment.