Skip to content

Commit 8e6d375

Browse files
committed
lexbor: Cherry pick "URL: the cloning function does not copy the type for IPv4 and IPv6."
see lexbor/lexbor@dcfcd64 Fixes php#20501
1 parent 6cac6d4 commit 8e6d375

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ PHP NEWS
2222
. Fixed bug GH-20483 (ASAN stack overflow with fiber.stack_size INI
2323
small value). (David Carlier)
2424

25+
- Lexbor:
26+
. Fixed bug GH-20501 (\Uri\WhatWg\Url lose host after calling
27+
withPath() or withQuery()). (lexborisov)
28+
2529
- Opcache:
2630
. Fixed bug GH-20329 (opcache.file_cache broken with full interned string
2731
buffer). (Arnaud)

ext/lexbor/lexbor/url/url.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023-2024 Alexander Borisov
2+
* Copyright (C) 2023-2025 Alexander Borisov
33
*
44
* Author: Alexander Borisov <[email protected]>
55
*/
@@ -1106,9 +1106,9 @@ lxb_url_host_copy(const lxb_url_host_t *src, lxb_url_host_t *dst,
11061106
}
11071107
}
11081108

1109-
if (src->type <= LXB_URL_HOST_TYPE_OPAQUE) {
1110-
dst->type = src->type;
1109+
dst->type = src->type;
11111110

1111+
if (src->type <= LXB_URL_HOST_TYPE_OPAQUE) {
11121112
if (src->type == LXB_URL_HOST_TYPE__UNDEF) {
11131113
return LXB_STATUS_OK;
11141114
}

0 commit comments

Comments
 (0)