From dd7fb609918862ccef6fc9201f871523cf0b0cbd Mon Sep 17 00:00:00 2001 From: provokateurin Date: Sun, 15 Sep 2024 15:27:37 +0200 Subject: fix(Tags): Return boolean for userHasTags() Signed-off-by: provokateurin --- lib/private/Tags.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/private/Tags.php b/lib/private/Tags.php index 420cabc36b9..d12a0f04b8c 100644 --- a/lib/private/Tags.php +++ b/lib/private/Tags.php @@ -248,8 +248,7 @@ class Tags implements ITags { * @param string $user The user whose tags are to be checked. */ public function userHasTag(string $name, string $user): bool { - $key = $this->array_searchi($name, $this->getTagsForUser($user)); - return ($key !== false) ? $this->tags[$key]->getId() : false; + return $this->array_searchi($name, $this->getTagsForUser($user)) !== false; } /** -- cgit v1.2.3