Undefined index in User.php on login

$_SESSION['CAT_DATE_FORMAT'] and/or $_SESSION['CAT_TIME_FORMAT'] seems
to be empty sometimes.