From acf732e760a43dbb436ff28b37eb6efe817b922c Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 3 Dec 2015 13:54:38 +0100 Subject: [PATCH] RepositoryQuery: Add method __clone() --- library/Icinga/Repository/RepositoryQuery.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/library/Icinga/Repository/RepositoryQuery.php b/library/Icinga/Repository/RepositoryQuery.php index af6643199..4c24c8617 100644 --- a/library/Icinga/Repository/RepositoryQuery.php +++ b/library/Icinga/Repository/RepositoryQuery.php @@ -64,6 +64,15 @@ class RepositoryQuery implements QueryInterface, SortRules, FilterColumns, Itera $this->repository = $repository; } + /** + * Clone all state relevant properties of this query + */ + public function __clone() + { + $this->query = clone $this->query; + $this->iterator = clone $this->iterator; + } + /** * Return the real query being used *