From: Dmitry Stogov Date: Mon, 29 Jun 2015 15:14:14 +0000 (+0300) Subject: Merge branch 'PHP-5.6' X-Git-Tag: php-7.1.0alpha3~25^2~108 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6cf6f2c6bf0b386c7bcaea0479f2f676d3ef8069;p=php Merge branch 'PHP-5.6' * PHP-5.6: On Windows PHP may be restarted with different set of DSO extensions without SHM reset. This may make optimisation for entities from DSO extensions inconsistent. Putting back deprecated symbols for ldap_sort Removed deprecated function calls from ldap module Removed ifdefs of LDAP_API_FEATURE_X_OPENLDAP, fixed a warning --- 6cf6f2c6bf0b386c7bcaea0479f2f676d3ef8069 diff --cc ext/ldap/ldap.c index a7e7522607,e2bcd17522..401842e431 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@@ -1958,19 -1913,15 +1958,19 @@@ PHP_FUNCTION(ldap_compare { zval *link; char *dn, *attr, *value; - int dn_len, attr_len, value_len; + size_t dn_len, attr_len, value_len; ldap_linkdata *ld; int errno; ++ struct berval lvalue; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsss", &link, &dn, &dn_len, &attr, &attr_len, &value, &value_len) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsss", &link, &dn, &dn_len, &attr, &attr_len, &value, &value_len) != SUCCESS) { return; } - struct berval lvalue; + if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) { + RETURN_FALSE; + } + - struct berval lvalue; lvalue.bv_val = value; lvalue.bv_len = value_len;