diff --git a/NEWS b/NEWS index 779a2e05523..d2508bf5bde 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,10 @@ PHP NEWS zend.exception_ignore_args=1 into account). (timwolla) . Fix fallback paths in fast_long_{add,sub}_function. (nielsdos) +- LDAP: + . Fixed bug GH-17704 (ldap_search fails when $attributes contains a + non-packed array with numerical keys). (nielsdos, 7u83) + - MBString: . Fixed bug GH-17503 (Undefined float conversion in mb_convert_variables). (cmb) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index e66ff070577..db4c5ab2310 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -248,7 +248,7 @@ static bool php_ldap_is_numerically_indexed_array(zend_array *arr) } } ZEND_HASH_FOREACH_END(); - return false; + return true; } /* {{{ Parse controls from and to arrays */ diff --git a/ext/ldap/tests/gh17704.phpt b/ext/ldap/tests/gh17704.phpt new file mode 100644 index 00000000000..2403a63860e --- /dev/null +++ b/ext/ldap/tests/gh17704.phpt @@ -0,0 +1,24 @@ +--TEST-- +GH-17704 (ldap_search fails when $attributes contains a non-packed array with numerical keys) +--EXTENSIONS-- +ldap +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +object(LDAP\Result)#%d (0) { +}