diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-07-26 16:01:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-26 16:01:03 +0200 |
commit | bf61067d8f01407c41cad6b0be166d9c0773ab2e (patch) | |
tree | cfc9f363281dbf31a35d5ee82b7b5d131e70ccf0 | |
parent | adcc061166ab86bd39b004bd85847320fdd2d525 (diff) | |
parent | ece41318b88fe77e182130e66e39f02fd7a96535 (diff) | |
download | nextcloud-server-bf61067d8f01407c41cad6b0be166d9c0773ab2e.tar.gz nextcloud-server-bf61067d8f01407c41cad6b0be166d9c0773ab2e.zip |
Merge pull request #10409 from nextcloud/bugfix/noid/dont_fail_no_fav_tag
Check if the favorite tag exists
-rw-r--r-- | lib/private/Tags.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Tags.php b/lib/private/Tags.php index 10c9affa277..c5c0761971b 100644 --- a/lib/private/Tags.php +++ b/lib/private/Tags.php @@ -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) { |