Check if the favorite tag exists
If the tag does not exist there is no need to do 💥 and log an
exception on error level
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
adcc061166
commit
ece41318b8
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