From 44ea8aa681132475f253960c694b8c001cdc5c0e Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 31 Mar 2016 20:51:50 +0200 Subject: [PATCH] Make sure $_SERVER['HTTP_REFERER'] isset when testing value --- lib/util.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/util.php b/lib/util.php index bc4898f847..b35eff84d8 100644 --- a/lib/util.php +++ b/lib/util.php @@ -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() -- 2.39.5