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/odbc/php_odbc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ext/odbc/php_odbc.c') diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index ab0638ed10..951e35a161 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -710,7 +710,10 @@ PHP_FUNCTION(odbc_close_all) int type; int i; int nument; - + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE) + return; + nument = zend_hash_next_free_element(&EG(regular_list)); /* Loop through list and close all statements */ -- cgit v1.2.1