Download src/php/php-src/ext/ldap/tests/gh17280.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 478 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ldap/tests/gh17280.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/ldap/tests/gh17280.phpt
-
curl -L -o gh17280.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ldap/tests/gh17280.phpt
478 Bytes
| --TEST-- | |
| GH-17280 (ldap_search() fails when $attributes array has holes) | |
| --EXTENSIONS-- | |
| ldap | |
| --FILE-- | |
| <?php | |
| /* We are assuming 3333 is not connectable */ | |
| $ldap = ldap_connect('ldap://127.0.0.1:3333'); | |
| // Creating an array with a hole in it | |
| $attr = array_unique(['cn', 'uid', 'uid', 'mail']); | |
| var_dump(ldap_search($ldap, 'ou=people,dc=example,dc=com', 'uid=admin', $attr)); | |
| ?> | |
| --EXPECTF-- | |
| Warning: ldap_search(): Search: Can't contact LDAP server in %s on line %d | |
| bool(false) | |