Skip to content

Commit 9e763f3

Browse files
Update ext/uri/uri_parser_rfc3986.c
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
1 parent 75dcdad commit 9e763f3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ext/uri/uri_parser_rfc3986.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,9 @@ ZEND_ATTRIBUTE_NONNULL static zend_result php_uri_parser_rfc3986_host_read(void
237237
if (has_text_range(&uriparser_uri->hostText)) {
238238
if (uriparser_uri->hostData.ip6 != NULL || uriparser_uri->hostData.ipFuture.first != NULL) {
239239
/* the textual representation of the host is always accessible in the .hostText field no matter what the host is */
240-
const size_t host_len = get_text_range_length(&uriparser_uri->hostText);
241-
242240
zend_string *host_str = zend_string_concat3(
243241
"[", 1,
244-
uriparser_uri->hostText.first, host_len,
242+
uriparser_uri->hostText.first, get_text_range_length(&uriparser_uri->hostText),
245243
"]", 1
246244
);
247245
ZVAL_NEW_STR(retval, host_str);

0 commit comments

Comments
 (0)