Skip to content

Commit bbb9fd2

Browse files
committed
uri: Only pass the errors zval when interested in it in php_uri_instantiate_uri()
This is no longer necessary since the previous commit and also is a layering violation, since `php_uri_instantiate_uri()` should not care how `parse_uri()` works internally.
1 parent 15388af commit bbb9fd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/uri/php_uri.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ ZEND_ATTRIBUTE_NONNULL_ARGS(1, 2) PHPAPI void php_uri_instantiate_uri(
343343
base_url = internal_base_url->uri;
344344
}
345345

346-
void *uri = uri_parser->parse_uri(ZSTR_VAL(uri_str), ZSTR_LEN(uri_str), base_url, should_throw || errors_zv != NULL ? &errors : NULL, !should_throw);
346+
void *uri = uri_parser->parse_uri(ZSTR_VAL(uri_str), ZSTR_LEN(uri_str), base_url, errors_zv != NULL ? &errors : NULL, !should_throw);
347347
if (UNEXPECTED(uri == NULL)) {
348348
if (should_throw) {
349349
zval_ptr_dtor(&errors);

0 commit comments

Comments
 (0)