File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ static void ldap_result_entry_free_obj(zend_object *obj)
233
233
#define VERIFY_LDAP_RESULT_OPEN (lr ) \
234
234
{ \
235
235
if (!lr->result) { \
236
- zend_throw_error(NULL, "LDAP result has already been freed "); \
236
+ zend_throw_error(NULL, "LDAP result has already been closed "); \
237
237
RETURN_THROWS(); \
238
238
} \
239
239
}
@@ -1167,7 +1167,6 @@ PHP_FUNCTION(ldap_connect)
1167
1167
size_t urllen = hostlen + sizeof ( "ldap://:65535" );
1168
1168
1169
1169
if (port <= 0 || port > 65535 ) {
1170
- zval_ptr_dtor (return_value );
1171
1170
zend_argument_value_error (2 , "must be between 1 and 65535" );
1172
1171
RETURN_THROWS ();
1173
1172
}
Original file line number Diff line number Diff line change 39
39
echo $ exception ->getMessage () . "\n" ;
40
40
}
41
41
42
+ try {
43
+ ldap_search ($ link , [], []);
44
+ } catch (TypeError $ exception ) {
45
+ echo $ exception ->getMessage () . "\n" ;
46
+ }
47
+
48
+ try {
49
+ ldap_search ($ link , "" , []);
50
+ } catch (TypeError $ exception ) {
51
+ echo $ exception ->getMessage () . "\n" ;
52
+ }
53
+
42
54
?>
43
55
--EXPECTF--
44
56
Warning: ldap_search(): Search: No such object in %s on line %d
@@ -49,3 +61,5 @@ bool(false)
49
61
ldap_search(): Argument #1 ($ldap) cannot be empty
50
62
ldap_search(): Argument #2 ($base) must have the same number of elements as the links array
51
63
ldap_search(): Argument #3 ($filter) must have the same number of elements as the links array
64
+ ldap_search(): Argument #2 ($base) must be of type string when argument #1 ($ldap) is an LDAP instance
65
+ ldap_search(): Argument #3 ($filter) must be of type string when argument #1 ($ldap) is an LDAP instance
You can’t perform that action at this time.
0 commit comments