xref: /php-src/ext/ldap/tests/bug73933.phpt (revision 69a8b63e)
1--TEST--
2Bug #73933 (error/segfault with ldap_mod_replace and opcache)
3--EXTENSIONS--
4ldap
5--FILE--
6<?php
7/* We are assuming 3333 is not connectable */
8$ldap = ldap_connect('ldap://127.0.0.1:3333');
9
10ldap_mod_replace($ldap, '', array(
11    'lockoutTime' => array(0),
12));
13
14ldap_modify_batch($ldap, '', array(    [
15    "attrib"  => "mail",
16    "modtype" => LDAP_MODIFY_BATCH_ADD,
17    "values"  => [
18        "test@example.com",
19        "test-2@example.com", ]]));
20
21ldap_close($ldap);
22
23?>
24--EXPECTF--
25Warning: ldap_mod_replace(): Modify: Can't contact LDAP server in %sbug73933.php on line %d
26
27Warning: ldap_modify_batch(): Batch Modify: Can't contact LDAP server in %sbug73933.php on line %d
28