Stala sa nečakaná chyba:

Call to a member function getEndDate() on null