Fix error if module xml not loaded

This commit is contained in:
Laurent Destailleur 2020-11-04 17:45:10 +01:00
parent 9ebe43b5b0
commit 60f55c81bf

View File

@ -50,7 +50,11 @@ if ($action == 'getlastversion')
{
$result = getURLContent('https://sourceforge.net/projects/dolibarr/rss');
//var_dump($result['content']);
$sfurl = simplexml_load_string($result['content']);
if (function_exists('simplexml_load_string')) {
$sfurl = simplexml_load_string($result['content']);
} else {
setEventMessages($langs->trans("ErrorPHPDoesNotSupport", "xml"), null, 'errors');
}
}