summaryrefslogtreecommitdiff
path: root/ext/standard/formatted_print.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/formatted_print.c')
-rw-r--r--ext/standard/formatted_print.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c
index 79051b3a10..1d58947ab8 100644
--- a/ext/standard/formatted_print.c
+++ b/ext/standard/formatted_print.c
@@ -727,9 +727,10 @@ PHP_FUNCTION(fprintf)
WRONG_PARAM_COUNT;
}
- if (zend_parse_parameters(1, "r", &arg1) == FAILURE) {
- RETURN_FALSE;
- }
+ ZEND_PARSE_PARAMETERS_START(1, -1)
+ Z_PARAM_RESOURCE(arg1)
+ /* php_formatted_print does its own zpp for extra args */
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
php_stream_from_zval(stream, arg1);
@@ -756,9 +757,10 @@ PHP_FUNCTION(vfprintf)
WRONG_PARAM_COUNT;
}
- if (zend_parse_parameters(1, "r", &arg1) == FAILURE) {
- RETURN_FALSE;
- }
+ ZEND_PARSE_PARAMETERS_START(1, -1)
+ Z_PARAM_RESOURCE(arg1)
+ /* php_formatted_print does its own zpp for extra args */
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
php_stream_from_zval(stream, arg1);