Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6717947

Browse files
committed
Fix GH-18015: Error messages for ldap_mod_replace are confusing
Closes GH-18053.
1 parent 4b9c72f commit 6717947

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

‎NEWS‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ PHP NEWS
3939
. Fixed bug GH-17984 (calls with arguments as array with references).
4040
(David Carlier)
4141

42+
- LDAP:
43+
. Fixed bug GH-18015 (Error messages for ldap_mod_replace are confusing).
44+
(nielsdos)
45+
4246
- Mbstring:
4347
. Fixed bug GH-17989 (mb_output_handler crash with unset
4448
http_output_conv_mimetypes). (nielsdos)

‎ext/ldap/ldap.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2278,7 +2278,7 @@ static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper, int ext)
22782278
ldap_mods[i]->mod_bvalues[0]->bv_len = Z_STRLEN_P(value);
22792279
} else {
22802280
if (!php_ldap_is_numerically_indexed_array(Z_ARRVAL_P(value))) {
2281-
zend_argument_value_error(3, "must be an array with numeric keys");
2281+
zend_argument_value_error(3, "attribute \"%s\" must be an array with numeric keys", ZSTR_VAL(attribute));
22822282
RETVAL_FALSE;
22832283
num_berval[i] = 0;
22842284
num_attribs = i + 1;

‎ext/ldap/tests/ldap_add_error.phpt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Warning: ldap_add(): Add: Already exists in %s on line %d
104104
bool(false)
105105
string(14) "Already exists"
106106
int(68)
107-
ldap_add(): Argument #3 ($entry) must be an array with numeric keys
107+
ldap_add(): Argument #3 ($entry) attribute "objectdiff-ff1d5879b5ede105769d77c6e9242b83b2de0751065f2ce46cf391110bed3ed1-108-108-0" data-selected="false" role="gridcell" tabindex="-1">108
108

109109
Warning: ldap_add(): Add: Undefined attribute type in %s on line %d
110110
bool(false)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /