From e9a89cf078789a7a9be129c8700dd397aaf56a19 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Mon, 12 Mar 2018 23:18:29 +0100 Subject: [PATCH] Fix : not reliable --- include/constant.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/constant.php b/include/constant.php index afa6e050f..cc46c6017 100644 --- a/include/constant.php +++ b/include/constant.php @@ -317,7 +317,11 @@ define ("PINDG",""); // Url of NOALYSS (http://...) // if ( ! defined ("NOALYSS_URL")) { - $base=$_SERVER['REQUEST_SCHEME'].'://'. + $protocol="http"; + if ( isset ($_SERVER['REQUEST_SCHEME'] )) { + $protocol=$_SERVER['REQUEST_SCHEME']; + } + $base=$protocol.'://'. $_SERVER['HTTP_HOST']. ":".$_SERVER['SERVER_PORT']. dirname($_SERVER['PHP_SELF']);