Commit 4a801a9a authored by Ad Schellevis's avatar Ad Schellevis

issue in error handling Config load

parent 31f4f5df
...@@ -236,12 +236,17 @@ class Config extends Singleton ...@@ -236,12 +236,17 @@ class Config extends Singleton
set_error_handler( set_error_handler(
function() { function() {
throw new ConfigException("invalid config xml") ; // reset simplexml pointer on parse error.
$this->simplexml = null ;
} }
); );
$this->simplexml = simplexml_load_string($xml); $this->simplexml = simplexml_load_string($xml);
if ($this->simplexml == null) {
throw new ConfigException("invalid config xml") ;
}
restore_error_handler(); restore_error_handler();
$this->statusIsValid = true; $this->statusIsValid = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment