Call to a member function getConfig() on null