@@ -69,13 +69,7 @@ function ldap_bind($link_identifier, string $bind_rdn = null, string $bind_passw
69
69
function ldap_control_paged_result_response ($ link , $ result , string &$ cookie = null , int &$ estimated = null ): void
70
70
{
71
71
error_clear_last ();
72
- if ($ estimated !== null ) {
73
- $ result = \ldap_control_paged_result_response ($ link , $ result , $ cookie , $ estimated );
74
- } elseif ($ cookie !== null ) {
75
- $ result = \ldap_control_paged_result_response ($ link , $ result , $ cookie );
76
- } else {
77
- $ result = \ldap_control_paged_result_response ($ link , $ result );
78
- }
72
+ $ result = \ldap_control_paged_result_response ($ link , $ result , $ cookie , $ estimated );
79
73
if ($ result === false ) {
80
74
throw LdapException::createFromPhpError ();
81
75
}
@@ -968,13 +962,7 @@ function ldap_next_attribute($link_identifier, $result_entry_identifier): string
968
962
function ldap_parse_exop ($ link , $ result , string &$ retdata = null , string &$ retoid = null ): void
969
963
{
970
964
error_clear_last ();
971
- if ($ retoid !== null ) {
972
- $ result = \ldap_parse_exop ($ link , $ result , $ retdata , $ retoid );
973
- } elseif ($ retdata !== null ) {
974
- $ result = \ldap_parse_exop ($ link , $ result , $ retdata );
975
- } else {
976
- $ result = \ldap_parse_exop ($ link , $ result );
977
- }
965
+ $ result = \ldap_parse_exop ($ link , $ result , $ retdata , $ retoid );
978
966
if ($ result === false ) {
979
967
throw LdapException::createFromPhpError ();
980
968
}
@@ -1003,17 +991,7 @@ function ldap_parse_exop($link, $result, string &$retdata = null, string &$retoi
1003
991
function ldap_parse_result ($ link , $ result , int &$ errcode , string &$ matcheddn = null , string &$ errmsg = null , array &$ referrals = null , array &$ serverctrls = null ): void
1004
992
{
1005
993
error_clear_last ();
1006
- if ($ serverctrls !== null ) {
1007
- $ result = \ldap_parse_result ($ link , $ result , $ errcode , $ matcheddn , $ errmsg , $ referrals , $ serverctrls );
1008
- } elseif ($ referrals !== null ) {
1009
- $ result = \ldap_parse_result ($ link , $ result , $ errcode , $ matcheddn , $ errmsg , $ referrals );
1010
- } elseif ($ errmsg !== null ) {
1011
- $ result = \ldap_parse_result ($ link , $ result , $ errcode , $ matcheddn , $ errmsg );
1012
- } elseif ($ matcheddn !== null ) {
1013
- $ result = \ldap_parse_result ($ link , $ result , $ errcode , $ matcheddn );
1014
- } else {
1015
- $ result = \ldap_parse_result ($ link , $ result , $ errcode );
1016
- }
994
+ $ result = \ldap_parse_result ($ link , $ result , $ errcode , $ matcheddn , $ errmsg , $ referrals , $ serverctrls );
1017
995
if ($ result === false ) {
1018
996
throw LdapException::createFromPhpError ();
1019
997
}
0 commit comments