Don't get referrer if undefined
[busui.git] / include / common-template.inc.php
blob:a/include/common-template.inc.php -> blob:b/include/common-template.inc.php
--- a/include/common-template.inc.php
+++ b/include/common-template.inc.php
@@ -27,7 +27,7 @@
     $url.= $GA_PIXEL . "?";
     $url.= "utmac=" . $GA_ACCOUNT;
     $url.= "&utmn=" . rand(0, 0x7fffffff);
-    $referer = $_SERVER["HTTP_REFERER"];
+    $referer = (isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : "");
     $query = $_SERVER["QUERY_STRING"];
     $path = $_SERVER["REQUEST_URI"];
     if (empty($referer)) {