From e10ebed2f4ef2b0844921c3b77bb16e4504644ac Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 7 Mar 2026 21:00:14 +0100 Subject: [PATCH] Fix fromid toid parsing --- system/src/Server/XML/Items.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/src/Server/XML/Items.php b/system/src/Server/XML/Items.php index 2ea3e40e..8a84cf62 100644 --- a/system/src/Server/XML/Items.php +++ b/system/src/Server/XML/Items.php @@ -31,9 +31,10 @@ class Items log_append('error.log', "[" . __CLASS__ . "] Fatal error: Cannot load items.xml - $file. Error: " . $e->getMessage()); return false; } + foreach($xml->xpath('item') as $item) { if ($item->attributes()->fromid) { - for ($id = $item->attributes()->fromid; $id <= $item->attributes()->toid; $id++) { + for ($id = (int)$item->attributes()->fromid; $id <= (int)$item->attributes()->toid; $id++) { $tmp = $this->parseNode($id, $item); $items[$tmp['id']] = $tmp['content']; }