aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorFatih Orhan <fatihorhan@gmail.com>2013-04-04 11:10:31 +0300
committerFatih Orhan <fatihorhan@gmail.com>2013-04-04 11:10:31 +0300
commitaa8e0a27e21c88dcaaf99af602219f1e79188a88 (patch)
treef725c315ed2d27536e17c0be3cf5266e4fb7bc8b /index.php
parentc44908ddd02eb5fd63c292bb7e0fa99a52f73222 (diff)
downloadwallabag-aa8e0a27e21c88dcaaf99af602219f1e79188a88.tar.gz
wallabag-aa8e0a27e21c88dcaaf99af602219f1e79188a88.tar.zst
wallabag-aa8e0a27e21c88dcaaf99af602219f1e79188a88.zip
Prevent "undefined index 'HTTPS'" Notice
In servers where notice error_level is enabled, php prints this notice which mixed in to url.
Diffstat (limited to 'index.php')
-rwxr-xr-xindex.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/index.php b/index.php
index e32996fa..167c4401 100755
--- a/index.php
+++ b/index.php
@@ -53,7 +53,11 @@ switch ($action) {
53} 53}
54 54
55function url(){ 55function url(){
56 $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https" : "http"; 56 $protocol = "http";
57 if(isset($_SERVER['HTTPS']))
58 if($_SERVER['HTTPS'] != "off")
59 $protocol = "https";
60
57 return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 61 return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
58} 62}
59?> 63?>