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