Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
addsubtag should push to array
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl authored and Backportbot committed Jul 15, 2019
commit 89f3df067f2eb08624175db00690bba57a8bb90b
7 changes: 6 additions & 1 deletion lib/private/FullTextSearch/Model/IndexDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,16 @@ final public function getMetaTags(): array {
* @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.
*
Expand Down