Skip to content

Commit de25e49

Browse files
authored
Merge pull request #16400 from nextcloud/bugfix/noid/fixing-addsubtag
addsubtag should push to array
2 parents 0ff1f16 + cb91b3c commit de25e49

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/private/FullTextSearch/Model/IndexDocument.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,16 @@ final public function getMetaTags(): array {
359359
* @return IIndexDocument
360360
*/
361361
final public function addSubTag(string $sub, string $tag): IIndexDocument {
362-
$this->subTags[$sub] = $tag;
362+
if (!array_key_exists($sub, $this->subTags)) {
363+
$this->subTags[$sub] = [];
364+
}
365+
366+
$this->subTags[$sub][] = $tag;
363367

364368
return $this;
365369
}
366370

371+
367372
/**
368373
* Set the list of sub tags assigned to the original document.
369374
*

0 commit comments

Comments
 (0)