From 8c497f05c4d93f4054f67fb9875f0894364020e2 Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Mon, 13 Aug 2001 06:43:47 +0000 Subject: We don't consistently check for args passed to functions that don't take any args. In some cases we probably want to skip the check for performance reasons, but in other cases where performance is unlikely to be a factor, not throwing a warning on the wrong number of args passed to a function is at best inconsistent, and at worst it could hide a bug. So, add a few such checks. There are still lots of cases out there. --- ext/hyperwave/hw.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/hyperwave/hw.c') diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c index 8f3120e858..a00e1c7fa3 100644 --- a/ext/hyperwave/hw.c +++ b/ext/hyperwave/hw.c @@ -1331,6 +1331,9 @@ PHP_FUNCTION(hw_errormsg) Returns object id of root collection */ PHP_FUNCTION(hw_root) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE) + return; + return_value->value.lval = 0; return_value->type = IS_LONG; } -- cgit v1.2.1