diff --git a/NEWS b/NEWS index cbf9dd7bd79..805363ed248 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,10 @@ PHP NEWS . Fixed bug GH-17984 (calls with arguments as array with references). (David Carlier) +- LDAP: + . Fixed bug GH-18015 (Error messages for ldap_mod_replace are confusing). + (nielsdos) + - Mbstring: . Fixed bug GH-17989 (mb_output_handler crash with unset http_output_conv_mimetypes). (nielsdos) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 67b01c0ec44..20245ed5696 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -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; diff --git a/ext/ldap/tests/ldap_add_error.phpt b/ext/ldap/tests/ldap_add_error.phpt index 5036b3091e8..209a7fb165d 100644 --- a/ext/ldap/tests/ldap_add_error.phpt +++ b/ext/ldap/tests/ldap_add_error.phpt @@ -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)