mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.4'
* PHP-8.4: Fix GH-17704: ldap_search fails when $attributes contains a non-packed array with numerical keys
This commit is contained in:
24
ext/ldap/tests/gh17704.phpt
Normal file
24
ext/ldap/tests/gh17704.phpt
Normal file
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
GH-17704 (ldap_search fails when $attributes contains a non-packed array with numerical keys)
|
||||
--EXTENSIONS--
|
||||
ldap
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipifbindfailure.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
include "connect.inc";
|
||||
|
||||
$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
|
||||
|
||||
$attributes = ["uid", "cn"];
|
||||
// force a non-packed array
|
||||
$attributes["x"] = "x";
|
||||
unset($attributes["x"]);
|
||||
|
||||
var_dump(ldap_search($link, $base, "(o=*)", $attributes));
|
||||
?>
|
||||
--EXPECTF--
|
||||
object(LDAP\Result)#%d (0) {
|
||||
}
|
||||
Reference in New Issue
Block a user