File tree 1 file changed +3
-4
lines changed 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -984,8 +984,6 @@ PHP_FUNCTION(ldap_connect)
984
984
RETURN_FALSE ;
985
985
}
986
986
987
- object_init_ex (return_value , ldap_link_ce );
988
- ld = Z_LDAP_LINK_P (return_value );
989
987
990
988
{
991
989
int rc = LDAP_SUCCESS ;
@@ -994,7 +992,6 @@ PHP_FUNCTION(ldap_connect)
994
992
size_t urllen = hostlen + sizeof ( "ldap://:65535" );
995
993
996
994
if (port <= 0 || port > 65535 ) {
997
- zval_ptr_dtor (return_value );
998
995
zend_argument_value_error (2 , "must be between 1 and 65535" );
999
996
RETURN_THROWS ();
1000
997
}
@@ -1016,10 +1013,12 @@ PHP_FUNCTION(ldap_connect)
1016
1013
LDAPG (tls_newctx ) = false;
1017
1014
}
1018
1015
#endif
1016
+ object_init_ex (return_value , ldap_link_ce );
1017
+ ld = Z_LDAP_LINK_P (return_value );
1019
1018
1020
1019
#ifdef LDAP_API_FEATURE_X_OPENLDAP
1021
1020
/* ldap_init() is deprecated, use ldap_initialize() instead.
1022
- */
1021
+ */
1023
1022
rc = ldap_initialize (& ldap , url );
1024
1023
#else /* ! LDAP_API_FEATURE_X_OPENLDAP */
1025
1024
/* ldap_init does not support URLs.
You can’t perform that action at this time.
0 commit comments