# 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 {
header("Cache-Control: $cache_control");
header('Expires: ' . gmdate('D, d M Y H:i:s',time()+31536000) . ' GMT'); # rfc 2616 says not to go more than a year in the future
}
-
-?>