Skip to content

Commit c70736f

Browse files
committed
refactor: zend parse parameters sets the return value on error to false
1 parent d89b21e commit c70736f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

brotli.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ static ZEND_FUNCTION(brotli_compress)
14811481
Z_PARAM_LONG(level)
14821482
Z_PARAM_LONG(mode)
14831483
Z_PARAM_STR_OR_NULL(dict)
1484-
ZEND_PARSE_PARAMETERS_END();
1484+
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
14851485

14861486
php_brotli_context ctx;
14871487
php_brotli_context_init(&ctx);
@@ -1538,7 +1538,7 @@ static ZEND_FUNCTION(brotli_compress_init)
15381538
Z_PARAM_LONG(level)
15391539
Z_PARAM_LONG(mode)
15401540
Z_PARAM_STR_OR_NULL(dict)
1541-
ZEND_PARSE_PARAMETERS_END();
1541+
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
15421542

15431543
PHP_BROTLI_CONTEXT_OBJ_INIT_OF_CLASS(php_brotli_compress_context_ce);
15441544

@@ -1573,7 +1573,7 @@ static ZEND_FUNCTION(brotli_compress_add)
15731573
Z_PARAM_STRING(in_buf, in_size)
15741574
Z_PARAM_OPTIONAL
15751575
Z_PARAM_LONG(mode)
1576-
ZEND_PARSE_PARAMETERS_END();
1576+
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
15771577

15781578
if (mode != BROTLI_OPERATION_PROCESS &&
15791579
mode != BROTLI_OPERATION_FLUSH &&
@@ -1670,7 +1670,7 @@ static ZEND_FUNCTION(brotli_uncompress)
16701670
Z_PARAM_STRING(in, in_size)
16711671
Z_PARAM_OPTIONAL
16721672
Z_PARAM_STR_OR_NULL(dict)
1673-
ZEND_PARSE_PARAMETERS_END();
1673+
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
16741674

16751675
php_brotli_context ctx;
16761676
php_brotli_context_init(&ctx);
@@ -1719,7 +1719,7 @@ static ZEND_FUNCTION(brotli_uncompress_init)
17191719
ZEND_PARSE_PARAMETERS_START(0, 1)
17201720
Z_PARAM_OPTIONAL
17211721
Z_PARAM_STR_OR_NULL(dict)
1722-
ZEND_PARSE_PARAMETERS_END();
1722+
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
17231723

17241724
PHP_BROTLI_CONTEXT_OBJ_INIT_OF_CLASS(php_brotli_uncompress_context_ce);
17251725

@@ -1753,7 +1753,7 @@ static ZEND_FUNCTION(brotli_uncompress_add)
17531753
Z_PARAM_STRING(in_buf, in_size)
17541754
Z_PARAM_OPTIONAL
17551755
Z_PARAM_LONG(mode)
1756-
ZEND_PARSE_PARAMETERS_END();
1756+
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
17571757

17581758
if (mode != BROTLI_OPERATION_PROCESS &&
17591759
mode != BROTLI_OPERATION_FLUSH &&

0 commit comments

Comments
 (0)