From b824bc54c28660c6f5c12d7ee72c03589045ec65 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Wed, 13 Oct 2021 00:20:25 +0200 Subject: [PATCH] ItemList/ExtendedCost * restore internal list pointer after using iterator get extended costs --- includes/types/item.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/types/item.class.php b/includes/types/item.class.php index b0ec0583..61518a8f 100644 --- a/includes/types/item.class.php +++ b/includes/types/item.class.php @@ -88,6 +88,8 @@ class ItemList extends BaseType if ($this->error) return []; + $idx = $this->id; + if (empty($this->vendors)) { $itemz = []; @@ -257,6 +259,9 @@ class ItemList extends BaseType unset($result[$itemId]); } + // restore internal index; + $this->getEntry($idx); + return $result; }