From 6d81a29bb6ae4df5d743b6df49da05631f307791 Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Sun, 15 Oct 2017 21:53:44 +0200 Subject: [PATCH] * check if monster file exist before loading it --- system/libs/pot/OTS_MonstersList.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/libs/pot/OTS_MonstersList.php b/system/libs/pot/OTS_MonstersList.php index 5e9a424c..7ad19fd6 100644 --- a/system/libs/pot/OTS_MonstersList.php +++ b/system/libs/pot/OTS_MonstersList.php @@ -118,7 +118,9 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess // loads file $monster = new OTS_Monster(); //echo $this->monstersPath . $this->monsters[$name]; - $monster->loadXML(trim(file_get_contents($this->monstersPath . $this->monsters[$name]))); + if(file_exists($this->monstersPath . $this->monsters[$name])) { + $monster->loadXML(trim(file_get_contents($this->monstersPath . $this->monsters[$name]))); + } return $monster; }