Skip to content

Commit 6b7dfdb

Browse files
committed
uri: Throw UriError when unable to read component
1 parent 5a6be79 commit 6b7dfdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/uri/php_uri_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void uri_read_component(INTERNAL_FUNCTION_PARAMETERS, php_uri_property_name prop
5252
const php_uri_property_handler *property_handler = php_uri_parser_property_handler_by_name(internal_uri->parser, property_name);
5353

5454
if (UNEXPECTED(property_handler->read(internal_uri->uri, component_read_mode, return_value) == FAILURE)) {
55-
zend_throw_error(NULL, "The %s component cannot be retrieved", ZSTR_VAL(get_known_string_by_property_name(property_name)));
55+
zend_throw_exception_ex(uri_error_ce, 0, "The %s component cannot be retrieved", ZSTR_VAL(get_known_string_by_property_name(property_name)));
5656
RETURN_THROWS();
5757
}
5858
}

0 commit comments

Comments
 (0)