From 5f1ee02e76f843654f89c0e1fd6bb05b76c4dc93 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Tue, 10 Nov 2015 16:16:42 +0300 Subject: [PATCH] =?UTF-8?q?FIX=20-=20=D1=80=D0=B5=D0=B4=D0=B8=D1=80=D0=B5?= =?UTF-8?q?=D0=BA=D1=82=20=D0=B1=D0=B5=D0=B7=20=D1=80=D0=B5=D1=84=D0=B5?= =?UTF-8?q?=D1=80=D1=80=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/controllers/GoController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ground/controllers/GoController.php b/ground/controllers/GoController.php index a280674..8124d24 100644 --- a/ground/controllers/GoController.php +++ b/ground/controllers/GoController.php @@ -12,11 +12,11 @@ class GoController extends Controller $url = $_GET['url']; $url = filter_var($url, FILTER_VALIDATE_URL); - if($url) { + if($url && isset($_SERVER['HTTP_REFERER'])) { $go = new GoAway(array( 'date' => date('c'), 'url' => $url, - 'ref' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '', + 'ref' => $_SERVER['HTTP_REFERER'], )); $go->save(); App::redirect($url, 302);