[php-src] PR #25502: Fix the ldap_set_option() controls type error naming the wrong option
| From: | lacatoire | Date: | Mon, 16 Nov 2026 21:46:14 +0000 |
| Subject: | [php-src] PR #25502: Fix the ldap_set_option() controls type error naming the wrong option | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40706@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25502
Author: lacatoire
ldap_set_option() handles LDAP_OPT_SERVER_CONTROLS and LDAP_OPT_CLIENT_CONTROLS in the same case,
and the type error always named LDAP_OPT_CLIENT_CONTROLS. Name the option that was passed.
To reproduce:
```php
<?php
ldap_set_option(ldap_connect('ldap://127.0.0.1:1'), LDAP_OPT_SERVER_CONTROLS,
"x");
```
Before (8.4.26):
TypeError: ldap_set_option(): Argument #3 ($value) must be of type array for
the LDAP_OPT_CLIENT_CONTROLS option, string given
After: ... for the LDAP_OPT_SERVER_CONTROLS option, string given