Error: Call to a member function getParams() on null: Call to a member function getParams() on null