[php-src] PR #25373: Fix the type reported by the ldap_modify_batch() type errors
| From: | lacatoire | Date: | Tue, 10 Nov 2026 16:13:48 +0000 |
| Subject: | [php-src] PR #25373: Fix the type reported by the ldap_modify_batch() type errors | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40515@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25373
Author: lacatoire
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
```php
<?php
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