Call to a member function getQuery() on string