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);