From 60f55c81bf1710615d151e6d091c398b4e056f9f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Nov 2020 17:45:10 +0100 Subject: [PATCH] Fix error if module xml not loaded --- htdocs/admin/system/dolibarr.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 24a3f2ca55f..6bae9666ee9 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -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'); + } }