Skip to content

Commit 99892ba

Browse files
committed
ext/ldap: fix ldap_explode_dn result ordering
1 parent a588f71 commit 99892ba

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ext/ldap/ldap.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2213,9 +2213,11 @@ PHP_FUNCTION(ldap_explode_dn)
22132213
}
22142214

22152215
array_init(return_value);
2216-
int i;
2216+
int i = 0;
22172217

2218-
for (i = 0; ldap_value[i] != NULL; i++);
2218+
while (ldap_value[i] != NULL) {
2219+
i++;
2220+
}
22192221

22202222
add_assoc_long(return_value, "count", i);
22212223

0 commit comments

Comments
 (0)