Skip to content

Commit 0d1ac02

Browse files
committed
recursive setOptions()
Signed-off-by: Maxence Lange <[email protected]>
1 parent 8944406 commit 0d1ac02

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

lib/Db/CoreQueryBuilder.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,14 +1571,18 @@ private function generateRemoteInstanceSelectAlias(string $alias, array $default
15711571
/**
15721572
* @param array $path
15731573
* @param array $options
1574+
*
1575+
* @return CoreQueryBuilder
15741576
*/
1575-
public function setOptions(array $path, array $options): void {
1577+
public function setOptions(array $path, array $options): self {
15761578
$options = [self::OPTIONS => $options];
15771579
foreach (array_reverse($path) as $item) {
15781580
$options = [$item => $options];
15791581
}
15801582

1581-
$this->options = $options;
1583+
$this->options = array_merge_recursive($this->options, $options);
1584+
1585+
return $this;
15821586
}
15831587

15841588

0 commit comments

Comments
 (0)