Explorar o código

Fix warning with icons (#4390)

Fix warning in cases when the user context is not yet available, for instance during install
Fix regression from https://github.com/FreshRSS/FreshRSS/pull/4353
Alexandre Alapetite %!s(int64=4) %!d(string=hai) anos
pai
achega
15cdb60ba0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/Models/Themes.php

+ 1 - 1
app/Models/Themes.php

@@ -128,7 +128,7 @@ class FreshRSS_Themes extends Minz_Model {
 			return Minz_Url::display($url);
 		}
 
-		if (FreshRSS_Context::$user_conf->icons_as_emojis) {
+		if (FreshRSS_Context::$user_conf && FreshRSS_Context::$user_conf->icons_as_emojis) {
 			return '<span class="icon">' . $alt . '</span>';
 		}