diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-07-15 08:45:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-15 08:45:16 +0200 |
commit | de25e492f8a6c1daa603d4cc89f763f9e284b464 (patch) | |
tree | 5660fab4da6dc7988dfa185ca643eeaa49ce79e0 | |
parent | 0ff1f1614c0dcc6e5e4b2b54a69871873396a8ec (diff) | |
parent | cb91b3ce3e63305d60f5cdd11a68120a649d7746 (diff) | |
download | nextcloud-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.php | 7 |
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. * |