aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-09-15 15:27:37 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-09-15 15:52:40 +0000
commitdd7fb609918862ccef6fc9201f871523cf0b0cbd (patch)
treedeb2e1e2b7357455da424c8880f33b19bbe05648
parentf2deb7710aad128636b88ed484071148867f3bf6 (diff)
downloadnextcloud-server-backport/48014/stable30.tar.gz
nextcloud-server-backport/48014/stable30.zip
fix(Tags): Return boolean for userHasTags()backport/48014/stable30
Signed-off-by: provokateurin <kate@provokateurin.de>
-rw-r--r--lib/private/Tags.php3
1 files changed, 1 insertions, 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;
}
/**