mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fixed another part in ldap (bug #73933)
This commit is contained in:
commit
5e09031144
@ -1730,7 +1730,7 @@ PHP_FUNCTION(ldap_modify_batch)
|
||||
);
|
||||
*/
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa", &link, &dn, &dn_len, &mods) != SUCCESS) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa/", &link, &dn, &dn_len, &mods) != SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1775,6 +1775,7 @@ PHP_FUNCTION(ldap_modify_batch)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
SEPARATE_ARRAY(mod);
|
||||
/* for the modification hashtable... */
|
||||
zend_hash_internal_pointer_reset(Z_ARRVAL_P(mod));
|
||||
num_modprops = zend_hash_num_elements(Z_ARRVAL_P(mod));
|
||||
@ -1849,6 +1850,7 @@ PHP_FUNCTION(ldap_modify_batch)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
SEPARATE_ARRAY(modinfo);
|
||||
/* is the array not empty? */
|
||||
zend_hash_internal_pointer_reset(Z_ARRVAL_P(modinfo));
|
||||
num_modvals = zend_hash_num_elements(Z_ARRVAL_P(modinfo));
|
||||
|
@ -13,8 +13,18 @@ ldap_mod_replace($ldap, null, array(
|
||||
'lockoutTime' => array(0),
|
||||
));
|
||||
|
||||
ldap_modify_batch($ldap, null, array( [
|
||||
"attrib" => "mail",
|
||||
"modtype" => LDAP_MODIFY_BATCH_ADD,
|
||||
"values" => [
|
||||
"test@example.com",
|
||||
"test-2@example.com", ]]));
|
||||
|
||||
|
||||
ldap_close($ldap);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: ldap_mod_replace(): Modify: Can't contact LDAP server in %sbug73933.php on line %d
|
||||
|
||||
Warning: ldap_modify_batch(): Batch Modify: Can't contact LDAP server in %sbug73933.php on line %d
|
||||
|
Loading…
Reference in New Issue
Block a user