1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix Uri\WhatWg\Url::withHost() (#19935)

Fixes GH-19913, fixes GH-19918, fixes GH-19920

Cherry-picked from lexbor/lexbor#a766eec632b69a8c3c1987aeb3910d51f110f8dc

Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
This commit is contained in:
Calvin Buckley
2025-09-23 15:44:07 -03:00
committed by GitHub
parent decf77f2fb
commit a9b69b1b3d
2 changed files with 3 additions and 1 deletions

1
NEWS
View File

@@ -83,6 +83,7 @@ PHP NEWS
. Fixed bug GH-19892 (Refcounting on zend_empty_array). (ilutov, timwolla)
. Fixed handling of port numbers > 65535 with the internal
`php_uri_parse_to_struct()` API. (timwolla)
. Fix Uri\WhatWg\Url::withHost(). (timwolla)
- Windows:
. Fix GH-19722 (_get_osfhandle asserts in debug mode when given a socket).

View File

@@ -4246,7 +4246,8 @@ lxb_url_host_set_h(lxb_url_t *url, lxb_url_parser_t *parser,
lxb_url_parser_t self_parser;
const lxb_char_t tmp[1] = "";
if (url->host.type == LXB_URL_HOST_TYPE_OPAQUE) {
/* If thiss URL has an opaque path, then return. */
if (url->path.opaque) {
return LXB_STATUS_OK;
}