mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 19:15:22 +00:00
issue in error handling Config load
This commit is contained in:
parent
31f4f5df60
commit
4a801a9a8a
@ -236,12 +236,17 @@ class Config extends Singleton
|
||||
|
||||
set_error_handler(
|
||||
function() {
|
||||
throw new ConfigException("invalid config xml") ;
|
||||
// reset simplexml pointer on parse error.
|
||||
$this->simplexml = null ;
|
||||
}
|
||||
);
|
||||
|
||||
$this->simplexml = simplexml_load_string($xml);
|
||||
|
||||
if ($this->simplexml == null) {
|
||||
throw new ConfigException("invalid config xml") ;
|
||||
}
|
||||
|
||||
restore_error_handler();
|
||||
$this->statusIsValid = true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user