Skip to content

Commit bf61067

Browse files
authored
Merge pull request #10409 from nextcloud/bugfix/noid/dont_fail_no_fav_tag
Check if the favorite tag exists
2 parents adcc061 + ece4131 commit bf61067

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/private/Tags.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,10 @@ public function purgeObjects(array $ids) {
624624
* @return array|false An array of object ids.
625625
*/
626626
public function getFavorites() {
627+
if(!$this->userHasTag(self::TAG_FAVORITE, $this->user)) {
628+
return [];
629+
}
630+
627631
try {
628632
return $this->getIdsForTag(self::TAG_FAVORITE);
629633
} catch(\Exception $e) {

0 commit comments

Comments
 (0)