Skip to content

Commit bf1cc7d

Browse files
committed
uri: Remove useless throw_invalid_uri_exception() helper in uri_parser_php_parse_url.c
1 parent 27b40a0 commit bf1cc7d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

ext/uri/uri_parser_php_parse_url.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,13 @@ static zend_result uri_parser_php_parse_url_fragment_read(const uri_internal_t *
146146
return SUCCESS;
147147
}
148148

149-
static void throw_invalid_uri_exception(void)
150-
{
151-
zend_throw_exception(uri_invalid_uri_exception_ce, "The specified URI is malformed", 0);
152-
}
153-
154149
static void *uri_parser_php_parse_url_parse(const char *uri_str, size_t uri_str_len, const void *base_url, zval *errors, bool silent)
155150
{
156151
bool has_port;
157152

158153
php_url *url = php_url_parse_ex2(uri_str, uri_str_len, &has_port);
159154
if (url == NULL && !silent) {
160-
throw_invalid_uri_exception();
155+
zend_throw_exception(uri_invalid_uri_exception_ce, "The specified URI is malformed", 0);
161156
}
162157

163158
return url;

0 commit comments

Comments
 (0)