Fix warning

This commit is contained in:
Laurent Destailleur 2023-09-10 19:34:30 +02:00
parent b265dd0548
commit 150c2baee7

View File

@ -635,7 +635,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
}
if (empty($method) || $method == 3 || $method == 4) {
$relativepathstring = $_SERVER["PHP_SELF"];
$relativepathstring = (empty($_SERVER["PHP_SELF"]) ? '' : $_SERVER["PHP_SELF"]);
// Clean $relativepathstring
if (constant('DOL_URL_ROOT')) {
$relativepathstring = preg_replace('/^'.preg_quote(constant('DOL_URL_ROOT'), '/').'/', '', $relativepathstring);