Call to a member function setTitle() on null