mirror of
https://github.com/slawkens/myaac.git
synced 2026-03-16 16:03:31 +01:00
Fix fromid toid parsing
This commit is contained in:
@@ -31,9 +31,10 @@ class Items
|
|||||||
log_append('error.log', "[" . __CLASS__ . "] Fatal error: Cannot load items.xml - $file. Error: " . $e->getMessage());
|
log_append('error.log', "[" . __CLASS__ . "] Fatal error: Cannot load items.xml - $file. Error: " . $e->getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($xml->xpath('item') as $item) {
|
foreach($xml->xpath('item') as $item) {
|
||||||
if ($item->attributes()->fromid) {
|
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);
|
$tmp = $this->parseNode($id, $item);
|
||||||
$items[$tmp['id']] = $tmp['content'];
|
$items[$tmp['id']] = $tmp['content'];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user