improved config file loading

This commit is contained in:
Steffen Schröder 2014-06-13 22:09:25 +02:00
parent 4c2a5e3260
commit 79c1260cb5

View File

@ -83,7 +83,12 @@ abstract class FileUtil {
logMessage("Config File isn't readable! Please check the File Permissions. ({$fileName})"); logMessage("Config File isn't readable! Please check the File Permissions. ({$fileName})");
return null; return null;
} }
return simplexml_load_file($fileLocation); $configXml = @simplexml_load_file($fileLocation);
if (!$configXml) {
logMessage("Config file isn't maintained properly! ({$fileName})");
return null;
}
return $configXml;
} }
/** /**