i added an if statement to set the session only if the RS is not empty:
<?php
session_start();
if($row_rs_Lodge['GSG_URL'] != "") {
$_SESSION["Lodge_GSG_URL"] = "".$row_rs_Lodge['GSG_URL']."" ;
session_commit();
}
?>
that seams to have fixed it.