Fix error message if file corrupted
This commit is contained in:
parent
93083e39c7
commit
e1e410ce91
@ -155,6 +155,10 @@ if (GETPOST('target') == 'local') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$xml = simplexml_load_file($xmlfile);
|
$xml = simplexml_load_file($xmlfile);
|
||||||
|
if ($xml === false) {
|
||||||
|
print '<div class="warning">'.$langs->trans('XmlCorrupted').': '.$xmlfile.'</span>';
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
print '<div class="warning">'.$langs->trans('XmlNotFound').': '.$xmlfile.'</span>';
|
print '<div class="warning">'.$langs->trans('XmlNotFound').': '.$xmlfile.'</span>';
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user