LDAPMessage *ldap_res;
int rc;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!s!a", &link, &ldap_bind_dn, &ldap_bind_dnlen, &ldap_bind_pw, &ldap_bind_pwlen, &serverctrls) != SUCCESS) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|s!s!a!", &link, &ldap_bind_dn, &ldap_bind_dnlen, &ldap_bind_pw, &ldap_bind_pwlen, &serverctrls) != SUCCESS) {
RETURN_THROWS();
}
Z_PARAM_LONG(sizelimit)
Z_PARAM_LONG(timelimit)
Z_PARAM_LONG(deref)
- Z_PARAM_ARRAY_EX(serverctrls, 0, 1)
+ Z_PARAM_ARRAY_EX(serverctrls, 1, 1)
ZEND_PARSE_PARAMETERS_END();
/* Reverse -> fall through */
}
}
- if (argcount > 8) {
+ if (serverctrls) {
/* We have to parse controls again for each link as they use it */
_php_ldap_controls_free(&lserverctrls);
lserverctrls = _php_ldap_controls_from_array(ld->link, serverctrls, 9);
}
ldap_filter = zend_string_copy(filter_str);
- if (argcount > 8) {
+ if (serverctrls) {
lserverctrls = _php_ldap_controls_from_array(ld->link, serverctrls, 9);
if (lserverctrls == NULL) {
ret = 0;
zend_ulong index;
int is_full_add=0; /* flag for full add operation so ldap_mod_add can be put back into oper, gerrit THomson */
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa/|a", &link, &dn, &dn_len, &entry, &serverctrls) != SUCCESS) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa/|a!", &link, &dn, &dn_len, &entry, &serverctrls) != SUCCESS) {
RETURN_THROWS();
}
int rc, msgid;
size_t dn_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|a", &link, &dn, &dn_len, &serverctrls) != SUCCESS) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|a!", &link, &dn, &dn_len, &serverctrls) != SUCCESS) {
RETURN_THROWS();
}
);
*/
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa/|a", &link, &dn, &dn_len, &mods, &serverctrls) != SUCCESS) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa/|a!", &link, &dn, &dn_len, &mods, &serverctrls) != SUCCESS) {
RETURN_THROWS();
}
int errno;
struct berval lvalue;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsss|a", &link, &dn, &dn_len, &attr, &attr_len, &value, &value_len, &serverctrls) != SUCCESS) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsss|a!", &link, &dn, &dn_len, &attr, &attr_len, &value, &value_len, &serverctrls) != SUCCESS) {
RETURN_THROWS();
}
size_t dn_len, newrdn_len, newparent_len;
zend_bool deleteoldrdn;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsssb|a", &link, &dn, &dn_len, &newrdn, &newrdn_len, &newparent, &newparent_len, &deleteoldrdn, &serverctrls) != SUCCESS) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsssb|a!", &link, &dn, &dn_len, &newrdn, &newrdn_len, &newparent, &newparent_len, &deleteoldrdn, &serverctrls) != SUCCESS) {
RETURN_THROWS();
}
* @param resource $ldap
* @return resource|false
*/
-function ldap_bind_ext($ldap, ?string $dn = null, ?string $password = null, array $controls = []) {}
+function ldap_bind_ext($ldap, ?string $dn = null, ?string $password = null, ?array $controls = null) {}
#ifdef HAVE_LDAP_SASL
/** @param resource $ldap */
* @param resource|array $ldap
* @return resource|false
*/
-function ldap_read($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {}
+function ldap_read($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null) {}
/**
* @param resource|array $ldap
* @return resource|false
*/
-function ldap_list($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {}
+function ldap_list($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null) {}
/**
* @param resource|array $ldap
* @return resource|false
*/
-function ldap_search($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $controls = []) {}
+function ldap_search($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, ?array $controls = null) {}
/** @param resource $ldap */
function ldap_free_result($ldap): bool {}
function ldap_dn2ufn(string $dn): string|false {}
/** @param resource $ldap */
-function ldap_add($ldap, string $dn, array $entry, array $controls = []): bool {}
+function ldap_add($ldap, string $dn, array $entry, ?array $controls = null): bool {}
/**
* @param resource $ldap
* @return resource|false
*/
-function ldap_add_ext($ldap, string $dn, array $entry, array $controls = []) {}
+function ldap_add_ext($ldap, string $dn, array $entry, ?array $controls = null) {}
/** @param resource $ldap */
-function ldap_delete($ldap, string $dn, array $controls = []): bool {}
+function ldap_delete($ldap, string $dn, ?array $controls = null): bool {}
/**
* @param resource $ldap
* @return resource|false
*/
-function ldap_delete_ext($ldap, string $dn, array $controls = []) {}
+function ldap_delete_ext($ldap, string $dn, ?array $controls = null) {}
/** @param resource $ldap */
-function ldap_modify_batch($ldap, string $dn, array $modifications_info, array $controls = []): bool {}
+function ldap_modify_batch($ldap, string $dn, array $modifications_info, ?array $controls = null): bool {}
/** @param resource $ldap */
-function ldap_mod_add($ldap, string $dn, array $entry, array $controls = []): bool {}
+function ldap_mod_add($ldap, string $dn, array $entry, ?array $controls = null): bool {}
/**
* @param resource $ldap
* @return resource|false
*/
-function ldap_mod_add_ext($ldap, string $dn, array $entry, array $controls = []) {}
+function ldap_mod_add_ext($ldap, string $dn, array $entry, ?array $controls = null) {}
/** @param resource $ldap */
-function ldap_mod_replace($ldap, string $dn, array $entry, array $controls = []): bool {}
+function ldap_mod_replace($ldap, string $dn, array $entry, ?array $controls = null): bool {}
/**
* @param resource $ldap
* @alias ldap_mod_replace
*/
-function ldap_modify($ldap, string $dn, array $entry, array $controls = []): bool {}
+function ldap_modify($ldap, string $dn, array $entry, ?array $controls = null): bool {}
/**
* @param resource $ldap
* @return resource|false
*/
-function ldap_mod_replace_ext($ldap, string $dn, array $entry, array $controls = []) {}
+function ldap_mod_replace_ext($ldap, string $dn, array $entry, ?array $controls = null) {}
/** @param resource $ldap */
-function ldap_mod_del($ldap, string $dn, array $entry, array $controls = []): bool {}
+function ldap_mod_del($ldap, string $dn, array $entry, ?array $controls = null): bool {}
/**
* @param resource $ldap
* @return resource|false
*/
-function ldap_mod_del_ext($ldap, string $dn, array $entry, array $controls = []) {}
+function ldap_mod_del_ext($ldap, string $dn, array $entry, ?array $controls = null) {}
/** @param resource $ldap */
function ldap_errno($ldap): int {}
function ldap_err2str(int $errno): string {}
/** @param resource $ldap */
-function ldap_compare($ldap, string $dn, string $attribute, string $value, array $controls = []): bool|int {}
+function ldap_compare($ldap, string $dn, string $attribute, string $value, ?array $controls = null): bool|int {}
#if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)
/** @param resource $ldap */
-function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, array $controls = []): bool {}
+function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null): bool {}
/**
* @param resource $ldap
* @return resource|false
*/
-function ldap_rename_ext($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, array $controls = []) {}
+function ldap_rename_ext($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null) {}
/**
* @param string $response_oid
* @return resource|bool
*/
-function ldap_exop($ldap, string $request_oid, ?string $request_data = null, ?array $controls = [], &$response_data = UNKNOWN, &$response_oid = null) {}
+function ldap_exop($ldap, string $request_oid, ?string $request_data = null, ?array $controls = NULL, &$response_data = UNKNOWN, &$response_oid = null) {}
#endif
#ifdef HAVE_LDAP_PASSWD
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 0c02f5e91a47e9664c8c41332bf8040e93592753 */
+ * Stub hash: 980ee25422e1b026259d63e7a61adea699751b86 */
#if defined(HAVE_ORALDAP)
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_connect, 0, 0, 0)
ZEND_ARG_INFO(0, ldap)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 1, "null")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
ZEND_END_ARG_INFO()
#if defined(HAVE_LDAP_SASL)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sizelimit, IS_LONG, 0, "-1")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timelimit, IS_LONG, 0, "-1")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, deref, IS_LONG, 0, "LDAP_DEREF_NEVER")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
ZEND_END_ARG_INFO()
#define arginfo_ldap_list arginfo_ldap_read
ZEND_ARG_INFO(0, ldap)
ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, entry, IS_ARRAY, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_add_ext, 0, 0, 3)
ZEND_ARG_INFO(0, ldap)
ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, entry, IS_ARRAY, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_delete, 0, 2, _IS_BOOL, 0)
ZEND_ARG_INFO(0, ldap)
ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_delete_ext, 0, 0, 2)
ZEND_ARG_INFO(0, ldap)
ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_modify_batch, 0, 3, _IS_BOOL, 0)
ZEND_ARG_INFO(0, ldap)
ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, modifications_info, IS_ARRAY, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
ZEND_END_ARG_INFO()
#define arginfo_ldap_mod_add arginfo_ldap_add
ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, attribute, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
ZEND_END_ARG_INFO()
#if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)
ZEND_ARG_TYPE_INFO(0, new_rdn, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, new_parent, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, delete_old_rdn, _IS_BOOL, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
ZEND_END_ARG_INFO()
#endif
ZEND_ARG_TYPE_INFO(0, new_rdn, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, new_parent, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, delete_old_rdn, _IS_BOOL, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 0, "[]")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
ZEND_END_ARG_INFO()
#endif
ZEND_ARG_INFO(0, ldap)
ZEND_ARG_TYPE_INFO(0, request_oid, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, request_data, IS_STRING, 1, "null")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "[]")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "NULL")
ZEND_ARG_INFO(1, response_data)
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, response_oid, "null")
ZEND_END_ARG_INFO()