]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - readityourself.php
Fix undefined index and constant problems
[github/wallabag/wallabag.git] / readityourself.php
index 2071b417529643b93f1ffd13d03bb459fb52c422..c59bb9d1226a03aa5f74670546400f8d9a3c1a92 100755 (executable)
@@ -26,7 +26,11 @@ require_once dirname(__FILE__).'/inc/rain.tpl.class.php';
 
 
 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'];
 }