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
1 changed files with 6 additions and 2 deletions

View File

@ -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;
}
}
/**