Fixed undefined variable $value

setScheme and setHostname method issue.