xref: /php-src/ext/ldap/tests/gh16389.phpt (revision 497dbaa2)
1--TEST--
2GH-16389 (Assertion failure in ext/ldap/ldap.c:2718)
3--EXTENSIONS--
4ldap
5--FILE--
6<?php
7$attrib = "attrib";
8$modtype = LDAP_MODIFY_BATCH_ADD;
9$values = ["value1"];
10$ldap = ldap_connect('ldap://127.0.0.1:3333');
11$modification_attrib_reference_string = [
12    [
13        "attrib"  => &$attrib,
14        "modtype" => &$modtype,
15        "values"  => &$values,
16    ],
17];
18var_dump(ldap_modify_batch($ldap, "", $modification_attrib_reference_string));
19?>
20--EXPECTF--
21Warning: ldap_modify_batch(): Batch Modify: Can't contact LDAP server in %s on line %d
22bool(false)
23