summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-07-15 08:45:16 +0200
committerGitHub <noreply@github.com>2019-07-15 08:45:16 +0200
commitde25e492f8a6c1daa603d4cc89f763f9e284b464 (patch)
tree5660fab4da6dc7988dfa185ca643eeaa49ce79e0
parent0ff1f1614c0dcc6e5e4b2b54a69871873396a8ec (diff)
parentcb91b3ce3e63305d60f5cdd11a68120a649d7746 (diff)
downloadnextcloud-server-de25e492f8a6c1daa603d4cc89f763f9e284b464.tar.gz
nextcloud-server-de25e492f8a6c1daa603d4cc89f763f9e284b464.zip
Merge pull request #16400 from nextcloud/bugfix/noid/fixing-addsubtag
addsubtag should push to array
-rw-r--r--lib/private/FullTextSearch/Model/IndexDocument.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/FullTextSearch/Model/IndexDocument.php b/lib/private/FullTextSearch/Model/IndexDocument.php
index 55cce902a28..d5bef906021 100644
--- a/lib/private/FullTextSearch/Model/IndexDocument.php
+++ b/lib/private/FullTextSearch/Model/IndexDocument.php
@@ -359,11 +359,16 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
* @return IIndexDocument
*/
final public function addSubTag(string $sub, string $tag): IIndexDocument {
- $this->subTags[$sub] = $tag;
+ if (!array_key_exists($sub, $this->subTags)) {
+ $this->subTags[$sub] = [];
+ }
+
+ $this->subTags[$sub][] = $tag;
return $this;
}
+
/**
* Set the list of sub tags assigned to the original document.
*