That’s not an error, it’s a warning, and it should be safe to ignore in this case.
The warning is merely informing you that $_SERVER variables can contain user input. Yes, HTTP_HOST and REQUEST_URI can be modified by the user in some circumstances, but in this case it can’t do any harm.