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:
parent
c44908ddd0
commit
aa8e0a27e2
@ -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'];
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user