From 77693a80b7ed0975b1c2455cca4f2f091e526071 Mon Sep 17 00:00:00 2001 From: Patrick Allaert Date: Sun, 7 Jun 2009 20:00:32 +0000 Subject: [PATCH] Fixed ldap_(first|next)_attribute() function producing 2 warning messages in case wrong parameters given --- ext/ldap/ldap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index db10408176..e1c4cf885d 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1051,8 +1051,8 @@ PHP_FUNCTION(ldap_first_attribute) ldap_resultentry *resultentry; char *attribute; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &link, &result_entry) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &link, &result_entry) != SUCCESS) { + return; } ZEND_FETCH_RESOURCE(ld, ldap_linkdata *, &link, -1, "ldap link", le_link); @@ -1078,8 +1078,8 @@ PHP_FUNCTION(ldap_next_attribute) ldap_resultentry *resultentry; char *attribute; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &link, &result_entry) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &link, &result_entry) != SUCCESS) { + return; } ZEND_FETCH_RESOURCE(ld, ldap_linkdata *, &link, -1, "ldap link", le_link); -- 2.50.1