Fix error message if file corrupted

This commit is contained in:
Laurent Destailleur 2021-07-11 03:04:06 +02:00
parent 93083e39c7
commit e1e410ce91

View File

@ -155,6 +155,10 @@ if (GETPOST('target') == 'local') {
}
}
$xml = simplexml_load_file($xmlfile);
if ($xml === false) {
print '<div class="warning">'.$langs->trans('XmlCorrupted').': '.$xmlfile.'</span>';
$error++;
}
} else {
print '<div class="warning">'.$langs->trans('XmlNotFound').': '.$xmlfile.'</span>';
$error++;