From 3b055839c4a4095c34ed95e7fb6283d0f7052e32 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Mon, 24 Jul 2023 15:54:04 +0200 Subject: [PATCH] SimpleQuery: Clone internal cache & reset `iterator` state --- library/Icinga/Data/SimpleQuery.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Data/SimpleQuery.php b/library/Icinga/Data/SimpleQuery.php index 1ef0c275be..5691386459 100644 --- a/library/Icinga/Data/SimpleQuery.php +++ b/library/Icinga/Data/SimpleQuery.php @@ -641,10 +641,15 @@ public function getColumns() } /** - * Deep clone self::$filter + * Deep clone self::$filter and self::ds */ public function __clone() { $this->filter = clone $this->filter; + $this->ds = clone $this->ds; + + $this->iterator = null; + $this->iteratorPosition = null; + $this->cachedCount = 0; } }