]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Make sure $_SERVER['HTTP_REFERER'] isset when testing value
authorMikael Nordfeldth <mmn@hethane.se>
Thu, 31 Mar 2016 18:51:50 +0000 (20:51 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Thu, 31 Mar 2016 18:51:50 +0000 (20:51 +0200)
lib/util.php

index bc4898f847db955a3dc1f65e7c77bcb621bcb3e9..b35eff84d8c4f2c402eef2bf7807768c5dc1efff 100644 (file)
@@ -266,7 +266,8 @@ function common_logged_in()
 
 function common_local_referer()
 {
-    return parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST) === common_config('site', 'server');
+    return isset($_SERVER['HTTP_REFERER'])
+            && parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST) === common_config('site', 'server');
 }
 
 function common_have_session()