Call to a member function getCurrent() on null