File tree 2 files changed +15
-3
lines changed
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,6 @@ typedef struct {
87
87
typedef struct {
88
88
LDAPMessage * data ;
89
89
BerElement * ber ;
90
- zval res ;
91
90
zend_object std ;
92
91
} ldap_result_entry ;
93
92
@@ -233,7 +232,7 @@ static void ldap_result_entry_free_obj(zend_object *obj)
233
232
#define VERIFY_LDAP_RESULT_OPEN (lr ) \
234
233
{ \
235
234
if (!lr->result) { \
236
- zend_throw_error(NULL, "LDAP result has already been freed "); \
235
+ zend_throw_error(NULL, "LDAP result has already been closed "); \
237
236
RETURN_THROWS(); \
238
237
} \
239
238
}
@@ -1167,7 +1166,6 @@ PHP_FUNCTION(ldap_connect)
1167
1166
size_t urllen = hostlen + sizeof ( "ldap://:65535" );
1168
1167
1169
1168
if (port <= 0 || port > 65535 ) {
1170
- zval_ptr_dtor (return_value );
1171
1169
zend_argument_value_error (2 , "must be between 1 and 65535" );
1172
1170
RETURN_THROWS ();
1173
1171
}
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