diff options
-rw-r--r-- | ext/hash/hash.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 3aedec6554..34dccfb32a 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -123,9 +123,12 @@ static void php_hash_do_hash(INTERNAL_FUNCTION_PARAMETERS, int isfilename, zend_ void *context; php_stream *stream = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ss|b", &algo, &data, &data_len, &raw_output) == FAILURE) { - RETURN_THROWS(); - } + ZEND_PARSE_PARAMETERS_START(2, 3) + Z_PARAM_STR(algo) + Z_PARAM_STRING(data, data_len) + Z_PARAM_OPTIONAL + Z_PARAM_BOOL(raw_output) + ZEND_PARSE_PARAMETERS_END(); ops = php_hash_fetch_ops(algo); if (!ops) { |