mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Use new parameter parsing API
This commit is contained in:
parent
a96cf2b175
commit
d8aad16dd0
@ -669,16 +669,13 @@ static char * php_formatted_print(int ht, int *len, int use_array, int format_of
|
||||
char *format, *result, padding;
|
||||
int always_sign;
|
||||
|
||||
argc = ZEND_NUM_ARGS();
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", &args, &argc) == FAILURE) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* verify the number of args */
|
||||
if ((use_array && argc != (2 + format_offset))
|
||||
|| (!use_array && argc < (1 + format_offset))) {
|
||||
WRONG_PARAM_COUNT_WITH_RETVAL(NULL);
|
||||
}
|
||||
args = (zval ***)safe_emalloc(argc, sizeof(zval *), 0);
|
||||
|
||||
if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
|
||||
efree(args);
|
||||
WRONG_PARAM_COUNT_WITH_RETVAL(NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user