Fix PHP warning when 1st argument of parse_host() is not a string (#1489486)