Commit 7a68c15c authored by Franco Fichtner's avatar Franco Fichtner

config: if file is not there, don't throw an error

(cherry picked from commit 7116568b)
parent 46362c09
...@@ -466,7 +466,7 @@ class Config extends Singleton ...@@ -466,7 +466,7 @@ class Config extends Singleton
$result = array (); $result = array ();
foreach ($backups as $filename) { foreach ($backups as $filename) {
// try to read backup info from xml // try to read backup info from xml
$xmlNode = simplexml_load_file($filename, "SimpleXMLElement", LIBXML_NOERROR | LIBXML_ERR_NONE); $xmlNode = @simplexml_load_file($filename, "SimpleXMLElement", LIBXML_NOERROR | LIBXML_ERR_NONE);
if (isset($xmlNode->revision)) { if (isset($xmlNode->revision)) {
$result[$filename] = $this->toArray(null, $xmlNode->revision); $result[$filename] = $this->toArray(null, $xmlNode->revision);
$result[$filename]['version'] = $xmlNode->version->__toString(); $result[$filename]['version'] = $xmlNode->version->__toString();
......
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