Kaynağa Gözat

Fix regression labels (#7150)

Regression from https://github.com/FreshRSS/FreshRSS/pull/7131
Alexandre Alapetite 1 yıl önce
ebeveyn
işleme
bbd81b3e7e
1 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  1. 5 1
      app/Models/Context.php

+ 5 - 1
app/Models/Context.php

@@ -471,7 +471,11 @@ final class FreshRSS_Context {
 					}
 					}
 				}
 				}
 				if ($tag === null) {
 				if ($tag === null) {
-					throw new FreshRSS_Context_Exception('Invalid tag: ' . $id);
+					$tagDAO = FreshRSS_Factory::createTagDao();
+					$tag = $tagDAO->searchById($id);
+					if ($tag === null) {
+						throw new FreshRSS_Context_Exception('Invalid tag: ' . $id);
+					}
 				}
 				}
 				self::$name = $tag->name();
 				self::$name = $tag->name();
 				self::$get_unread = $tag->nbUnread();
 				self::$get_unread = $tag->nbUnread();