Skip to content

Commit fedaa7b

Browse files
committed
add test
1 parent 4871865 commit fedaa7b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

ext/ldap/tests/gh18902.phpt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--TEST--
2+
GH-17704 (ldap_search fails when $attributes contains a non-packed array with numerical keys)
3+
--EXTENSIONS--
4+
ldap
5+
--FILE--
6+
<?php
7+
$conn = ldap_connect();
8+
try {
9+
ldap_exop($conn,null);
10+
} catch (\ValueError $e) {
11+
echo $e->getMessage(), PHP_EOL;
12+
}
13+
14+
try {
15+
ldap_exop($conn,"\0");
16+
} catch (\ValueError $e) {
17+
echo $e->getMessage(), PHP_EOL;
18+
}
19+
?>
20+
--EXPECTF--
21+
22+
Deprecated: ldap_exop(): Passing null to parameter #2 ($request_oid) of type string is deprecated in %s on line %d
23+
ldap_exop(): Argument #2 ($request_oid) cannot be empty
24+
ldap_exop(): Argument #2 ($request_oid) must not contain any null bytes

0 commit comments

Comments
 (0)