1--TEST-- 2ldap_modify_batch() - bug 77958 - values in ldap_modify_batch must be "string" 3--CREDITS-- 4Côme Chilliet <mcmic@php.net> 5--SKIPIF-- 6<?php require_once('skipif.inc'); ?> 7<?php require_once('skipifbindfailure.inc'); ?> 8--FILE-- 9<?php 10require "connect.inc"; 11 12$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 13insert_dummy_data($link, $base); 14 15$mods = array( 16 array( 17 "attrib" => "telephoneNumber", 18 "modtype" => LDAP_MODIFY_BATCH_ADD, 19 "values" => array( 20 123456 21 ) 22 ), 23 array( 24 "attrib" => "description", 25 "modtype" => LDAP_MODIFY_BATCH_REMOVE_ALL 26 ) 27); 28 29var_dump( 30 ldap_modify_batch($link, "cn=userA,$base", $mods), 31 $entry = ldap_first_entry($link, ldap_read($link, "cn=userA,$base", "(telephoneNumber=*)")), 32 ldap_get_values($link, $entry, "telephoneNumber") 33); 34?> 35===DONE=== 36--CLEAN-- 37<?php 38require "connect.inc"; 39 40$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 41 42remove_dummy_data($link, $base); 43?> 44--EXPECTF-- 45bool(true) 46resource(%d) of type (ldap result entry) 47array(3) { 48 [0]=> 49 string(14) "xx-xx-xx-xx-xx" 50 [1]=> 51 string(6) "123456" 52 ["count"]=> 53 int(2) 54} 55===DONE=== 56