Check if empty before getting
if (isset($_GET['var']) && $_GET['var'] !== ''){ $_SESSION['foo'] = $_GET['var']; }