diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 90f3ba6a54f..95dc642222a 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -2316,12 +2316,12 @@ static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper, int ext) SEPARATE_ARRAY(attribute_values); uint32_t num_values = zend_hash_num_elements(Z_ARRVAL_P(attribute_values)); if (num_values == 0) { - zend_argument_value_error(3, "list of attribute values must not be empty"); + zend_argument_value_error(3, "attribute \"%s\" must be a non-empty list of attribute values", ZSTR_VAL(attribute)); RETVAL_FALSE; goto cleanup; } if (!php_ldap_is_numerically_indexed_array(Z_ARRVAL_P(attribute_values))) { - zend_argument_value_error(3, "must be an array of attribute values with numeric keys"); + zend_argument_value_error(3, "attribute \"%s\" must be an array of attribute values with numeric keys", ZSTR_VAL(attribute)); RETVAL_FALSE; goto cleanup; } diff --git a/ext/ldap/tests/ldap_add_modify_delete_programming_errors.phpt b/ext/ldap/tests/ldap_add_modify_delete_programming_errors.phpt index 879b465dfea..a84e068ba3a 100644 --- a/ext/ldap/tests/ldap_add_modify_delete_programming_errors.phpt +++ b/ext/ldap/tests/ldap_add_modify_delete_programming_errors.phpt @@ -137,7 +137,7 @@ ValueError: ldap_add(): Argument #3 ($entry) must be an associative array of att ValueError: ldap_add(): Argument #3 ($entry) key must not be empty ValueError: ldap_add(): Argument #3 ($entry) key must not contain any null bytes Error: Object of class stdClass could not be converted to string -ValueError: ldap_add(): Argument #3 ($entry) list of attribute values must not be empty -ValueError: ldap_add(): Argument #3 ($entry) must be an array of attribute values with numeric keys +ValueError: ldap_add(): Argument #3 ($entry) attribute "attribute2" must be a non-empty list of attribute values +ValueError: ldap_add(): Argument #3 ($entry) attribute "attribute2" must be an array of attribute values with numeric keys TypeError: LDAP value must be of type string|int|bool, array given Error: Object of class stdClass could not be converted to string diff --git a/ext/ldap/tests/ldap_add_modify_delete_references_programming_errors.phpt b/ext/ldap/tests/ldap_add_modify_delete_references_programming_errors.phpt index 4926dbb841d..3ded9699f45 100644 --- a/ext/ldap/tests/ldap_add_modify_delete_references_programming_errors.phpt +++ b/ext/ldap/tests/ldap_add_modify_delete_references_programming_errors.phpt @@ -76,6 +76,6 @@ try { ?> --EXPECT-- Error: Object of class stdClass could not be converted to string -ValueError: ldap_add(): Argument #3 ($entry) list of attribute values must not be empty +ValueError: ldap_add(): Argument #3 ($entry) attribute "attribute2" must be a non-empty list of attribute values TypeError: LDAP value must be of type string|int|bool, array given TypeError: LDAP value must be of type string|int|bool, stdClass given