From 7262a097e33f44130a6d541b39596d88bd9f5585 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 26 Jun 2022 20:27:51 +0200 Subject: [PATCH] Better error message --- htdocs/admin/system/filecheck.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index c637a1fbc64..97fab9658c7 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -101,6 +101,10 @@ if ($xmlremote && !preg_match('/^https?:\/\//', $xmlremote)) { $langs->load("errors"); setEventMessages($langs->trans("ErrorURLMustStartWithHttp", $xmlremote), '', 'errors'); $error++; +} elseif ($xmlremote && !preg_match('/\.xml$/', $xmlremote)) { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorURLMustEndWith", $xmlremote, '.xml'), '', 'errors'); + $error++; } // Test if remote test is ok