diff --git a/NEWS b/NEWS index 5f7017b6368..c2e1c14bc73 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,10 @@ PHP NEWS . Fixed bug GH-17703 (imagescale with both width and height negative values triggers only an Exception on width). (David Carlier) +- 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 ad112a968f2..67b01c0ec44 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -247,7 +247,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) { +}