Call to a member function getStore() on null