浏览代码

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 3 年之前
父节点
当前提交
15cdb60ba0
共有 1 个文件被更改,包括 1 次插入1 次删除
  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>';
 		}