diff --git a/lib/private/Tags.php b/lib/private/Tags.php index 766166beadd36..8f594b8d6529b 100644 --- a/lib/private/Tags.php +++ b/lib/private/Tags.php @@ -272,8 +272,7 @@ public function getIdsForTag($tag) { * @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; } /**