diff --git a/library/Icinga/Data/Db/DbQuery.php b/library/Icinga/Data/Db/DbQuery.php index 5062c8caf..d7cca4d85 100644 --- a/library/Icinga/Data/Db/DbQuery.php +++ b/library/Icinga/Data/Db/DbQuery.php @@ -313,6 +313,13 @@ class DbQuery extends SimpleQuery . "\n\n"; } + public function __clone() + { + if ($this->select) { + $this->select = clone $this->select; + } + } + /** * @return string */