From: Jani Taskinen Date: Fri, 13 Jul 2007 10:55:43 +0000 (+0000) Subject: - Do not break thousands of scripts.. (will remove in 5.3) X-Git-Tag: php-5.2.4RC1~154 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=06877d0064a6e329ca5ee3e6bdb8100c41a5725f;p=php - Do not break thousands of scripts.. (will remove in 5.3) --- diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 4fb5febe1c..bee17a5201 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1130,8 +1130,9 @@ PHP_FUNCTION(ldap_first_attribute) ldap_linkdata *ld; ldap_resultentry *resultentry; char *attribute; + int argc = ZEND_NUM_ARGS(); - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &link, &result_entry) == FAILURE) { + if ((argc < 2 || argc > 3) || zend_get_parameters_ex(2, &link, &result_entry) == FAILURE) { WRONG_PARAM_COUNT; } @@ -1157,8 +1158,9 @@ PHP_FUNCTION(ldap_next_attribute) ldap_linkdata *ld; ldap_resultentry *resultentry; char *attribute; + int argc = ZEND_NUM_ARGS(); - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &link, &result_entry) == FAILURE) { + if ((argc < 2 || argc > 3) || zend_get_parameters_ex(2, &link, &result_entry) == FAILURE) { WRONG_PARAM_COUNT; }