diff options
author | Fatih Orhan <fatihorhan@gmail.com> | 2013-04-04 11:10:31 +0300 |
---|---|---|
committer | Fatih Orhan <fatihorhan@gmail.com> | 2013-04-04 11:10:31 +0300 |
commit | aa8e0a27e21c88dcaaf99af602219f1e79188a88 (patch) | |
tree | f725c315ed2d27536e17c0be3cf5266e4fb7bc8b /index.php | |
parent | c44908ddd02eb5fd63c292bb7e0fa99a52f73222 (diff) | |
download | wallabag-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-x | index.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -53,7 +53,11 @@ switch ($action) { | |||
53 | } | 53 | } |
54 | 54 | ||
55 | function url(){ | 55 | function 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 | ?> |