From aaa842251277ac7053c78f2b17d1e4815020c041 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Thu, 8 Oct 2015 16:50:39 -0400 Subject: [PATCH] avoid NOTICes by checking isset() first --- http.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http.php b/http.php index 76c6684..b1f2aec 100644 --- a/http.php +++ b/http.php @@ -8,7 +8,7 @@ # return our best guess at the url used to access this page, without the path or query string function this_url_sans_path() { - if(strtolower($_SERVER['HTTPS']) == 'on' || strtolower($_SERVER['HTTPS']) == 'yes') { + if (isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on' || strtolower($_SERVER['HTTPS']) == 'yes')) { $url = 'https'; $expected_port = 443; } else { -- 1.7.10.4