mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 09:19:22 +02:00
Fixed the check if vocations.xml were correctly loaded
This commit is contained in:
parent
b2b0b31168
commit
b24370e7ed
@ -142,10 +142,8 @@ else {
|
||||
if(!@file_exists($file))
|
||||
$file = $config['data_path'] . 'vocations.xml';
|
||||
|
||||
$vocations->load($file);
|
||||
|
||||
if(!$vocations)
|
||||
throw new RuntimeException('ERROR: Cannot load <i>vocations.xml</i> file.');
|
||||
if(!$vocations->load($file))
|
||||
throw new RuntimeException('ERROR: Cannot load <i>vocations.xml</i> - the file is malformed. Check the file with xml syntax validator.');
|
||||
|
||||
$config['vocations'] = array();
|
||||
foreach($vocations->getElementsByTagName('vocation') as $vocation) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user