1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-30 04:42:19 -05:00

Prevent "undefined index 'HTTPS'" Notice

In servers where notice error_level is enabled, php prints this notice
which mixed in to url.
This commit is contained in:
Fatih Orhan 2013-04-04 11:10:31 +03:00
parent c44908ddd0
commit aa8e0a27e2

View File

@ -53,7 +53,11 @@ switch ($action) {
}
function url(){
$protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https" : "http";
$protocol = "http";
if(isset($_SERVER['HTTPS']))
if($_SERVER['HTTPS'] != "off")
$protocol = "https";
return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
}
?>