Skip to content

Fix GH-18015: Error messages for ldap_mod_replace are confusing #18053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/ldap/ldap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2278,7 +2278,7 @@ static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper, int ext)
ldap_mods[i]->mod_bvalues[0]->bv_len = Z_STRLEN_P(value);
} else {
if (!php_ldap_is_numerically_indexed_array(Z_ARRVAL_P(value))) {
zend_argument_value_error(3, "must be an array with numeric keys");
zend_argument_value_error(3, "attribute \"%s\" must be an array with numeric keys", ZSTR_VAL(attribute));
RETVAL_FALSE;
num_berval[i] = 0;
num_attribs = i + 1;
Expand Down
2 changes: 1 addition & 1 deletion ext/ldap/tests/ldap_add_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Warning: ldap_add(): Add: Already exists in %s on line %d
bool(false)
string(14) "Already exists"
int(68)
ldap_add(): Argument #3 ($entry) must be an array with numeric keys
ldap_add(): Argument #3 ($entry) attribute "objectClass" must be an array with numeric keys

Warning: ldap_add(): Add: Undefined attribute type in %s on line %d
bool(false)
Expand Down
Loading