Merge pull request #16405 from nextcloud/backport/16400/stable16
[stable16] addsubtag should push to array
This commit is contained in:
commit
e945e3bf6f
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue