From b24370e7eda662a683604b58a178e07e50986bf4 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sun, 17 Jan 2021 17:44:30 +0100 Subject: [PATCH] Fixed the check if vocations.xml were correctly loaded --- system/init.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/system/init.php b/system/init.php index 2a778862..cc42180c 100644 --- a/system/init.php +++ b/system/init.php @@ -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 vocations.xml file.'); + if(!$vocations->load($file)) + throw new RuntimeException('ERROR: Cannot load vocations.xml - the file is malformed. Check the file with xml syntax validator.'); $config['vocations'] = array(); foreach($vocations->getElementsByTagName('vocation') as $vocation) {