Error thrown

Object of class stdClass could not be converted to string