]> source.dussan.org Git - nextcloud-server.git/commitdiff
addsubtag should push to array 16405/head
authorMaxence Lange <maxence@artificial-owl.com>
Sun, 14 Jul 2019 20:17:55 +0000 (19:17 -0100)
committerBackportbot <backportbot-noreply@rullzer.com>
Mon, 15 Jul 2019 06:45:58 +0000 (06:45 +0000)
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
lib/private/FullTextSearch/Model/IndexDocument.php

index 55cce902a281198d3c60e01cc473b8d27acdb7cd..d5bef9060211059803c81f35d294896582ffebd0 100644 (file)
@@ -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.
         *