mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
Merge pull request #10409 from nextcloud/bugfix/noid/dont_fail_no_fav_tag
Check if the favorite tag exists
This commit is contained in:
commit
bf61067d8f
1 changed files with 4 additions and 0 deletions
|
|
@ -624,6 +624,10 @@ class Tags implements \OCP\ITags {
|
|||
* @return array|false An array of object ids.
|
||||
*/
|
||||
public function getFavorites() {
|
||||
if(!$this->userHasTag(self::TAG_FAVORITE, $this->user)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
try {
|
||||
return $this->getIdsForTag(self::TAG_FAVORITE);
|
||||
} catch(\Exception $e) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue