Call to a member function getProperties() on null