Skip to content

Fix the type reported by the ldap_modify_batch() type errors - #25373

Open
lacatoire wants to merge 2 commits into
php:PHP-8.5from
lacatoire:fix/ldap-modify-batch-type-error-value-8.5
Open

lacatoire wants to merge 2 commits into
php:PHP-8.5from
lacatoire:fix/ldap-modify-batch-type-error-value-8.5

Conversation

@lacatoire

@lacatoire lacatoire commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Two type errors of ldap_modify_batch() (the "modtype" option must be of type int, the "values" option must be of type array) reported the type of attrib, a string already checked at that point, instead of the type of the rejected value. They now report the type of the value.

ldap_modify_batch_programming_error.phpt expected the wrong type for its stdClass modtype, so its expected output is updated.

To reproduce

ldap_modify_batch(ldap_connect('ldap://127.0.0.1:1'), "cn=x", [["attrib" => "a", "modtype" => [], "values" => ["v"]]]);

Before: ... must be of type int, string given

After: ... must be of type int, array given

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants