Skip to content

refactor: zend parse parameters sets the return value on error to false #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions brotli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,7 @@ static ZEND_FUNCTION(brotli_compress)
Z_PARAM_LONG(level)
Z_PARAM_LONG(mode)
Z_PARAM_STR_OR_NULL(dict)
ZEND_PARSE_PARAMETERS_END();
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);

php_brotli_context ctx;
php_brotli_context_init(&ctx);
Expand Down Expand Up @@ -1538,7 +1538,7 @@ static ZEND_FUNCTION(brotli_compress_init)
Z_PARAM_LONG(level)
Z_PARAM_LONG(mode)
Z_PARAM_STR_OR_NULL(dict)
ZEND_PARSE_PARAMETERS_END();
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);

PHP_BROTLI_CONTEXT_OBJ_INIT_OF_CLASS(php_brotli_compress_context_ce);

Expand Down Expand Up @@ -1573,7 +1573,7 @@ static ZEND_FUNCTION(brotli_compress_add)
Z_PARAM_STRING(in_buf, in_size)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(mode)
ZEND_PARSE_PARAMETERS_END();
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);

if (mode != BROTLI_OPERATION_PROCESS &&
mode != BROTLI_OPERATION_FLUSH &&
Expand Down Expand Up @@ -1670,7 +1670,7 @@ static ZEND_FUNCTION(brotli_uncompress)
Z_PARAM_STRING(in, in_size)
Z_PARAM_OPTIONAL
Z_PARAM_STR_OR_NULL(dict)
ZEND_PARSE_PARAMETERS_END();
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);

php_brotli_context ctx;
php_brotli_context_init(&ctx);
Expand Down Expand Up @@ -1719,7 +1719,7 @@ static ZEND_FUNCTION(brotli_uncompress_init)
ZEND_PARSE_PARAMETERS_START(0, 1)
Z_PARAM_OPTIONAL
Z_PARAM_STR_OR_NULL(dict)
ZEND_PARSE_PARAMETERS_END();
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);

PHP_BROTLI_CONTEXT_OBJ_INIT_OF_CLASS(php_brotli_uncompress_context_ce);

Expand Down Expand Up @@ -1753,7 +1753,7 @@ static ZEND_FUNCTION(brotli_uncompress_add)
Z_PARAM_STRING(in_buf, in_size)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(mode)
ZEND_PARSE_PARAMETERS_END();
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);

if (mode != BROTLI_OPERATION_PROCESS &&
mode != BROTLI_OPERATION_FLUSH &&
Expand Down
Loading