RepositoryQuery: Avoid cloning sub-objects when they are null

fixes #12078
This commit is contained in:
Markus Frosch 2016-06-30 13:16:05 +02:00
parent fc93dd2b58
commit e9681de388

View File

@ -69,9 +69,13 @@ class RepositoryQuery implements QueryInterface, SortRules, FilterColumns, Itera
*/ */
public function __clone() public function __clone()
{ {
if ($this->query !== null) {
$this->query = clone $this->query; $this->query = clone $this->query;
}
if ($this->iterator !== null) {
$this->iterator = clone $this->iterator; $this->iterator = clone $this->iterator;
} }
}
/** /**
* Return a string representation of this query * Return a string representation of this query