RepositoryQuery: Avoid cloning sub-objects when they are null
fixes #12078
This commit is contained in:
parent
fc93dd2b58
commit
e9681de388
|
@ -69,8 +69,12 @@ class RepositoryQuery implements QueryInterface, SortRules, FilterColumns, Itera
|
|||
*/
|
||||
public function __clone()
|
||||
{
|
||||
$this->query = clone $this->query;
|
||||
$this->iterator = clone $this->iterator;
|
||||
if ($this->query !== null) {
|
||||
$this->query = clone $this->query;
|
||||
}
|
||||
if ($this->iterator !== null) {
|
||||
$this->iterator = clone $this->iterator;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue