summaryrefslogtreecommitdiff
path: root/ext/hyperwave/hw.c
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2001-08-13 06:43:47 +0000
committerRasmus Lerdorf <rasmus@php.net>2001-08-13 06:43:47 +0000
commit8c497f05c4d93f4054f67fb9875f0894364020e2 (patch)
tree0c3a97abb0de616fb036f38e18f752e042b36623 /ext/hyperwave/hw.c
parent3f505f8624836b32f919b9fbcc533b8e069a87c9 (diff)
downloadphp-git-8c497f05c4d93f4054f67fb9875f0894364020e2.tar.gz
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.
Diffstat (limited to 'ext/hyperwave/hw.c')
-rw-r--r--ext/hyperwave/hw.c3
1 files changed, 3 insertions, 0 deletions
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;
}