ext/ldap: fix ldap_explode_dn result ordering and simplify count handling#22519
ext/ldap: fix ldap_explode_dn result ordering and simplify count handling#22519arshidkv12 wants to merge 5 commits into
Conversation
Girgias
left a comment
There was a problem hiding this comment.
Just move the add_assoc_long() call prior to the for loop
|
Also needs to target a lower branch. |
| array_init(return_value); | ||
| int i; | ||
|
|
||
| for (i = 0; ldap_value[i] != NULL; i++); |
There was a problem hiding this comment.
Sorry, I'm a bit confused. Could you please clarify what you mean?
Is the following correct?
add_assoc_long(return_value, "count", 0);
for (i = 0; ldap_value[i] != NULL; i++) {
add_index_string(return_value, i, ldap_value[i]);
}
add_assoc_long(return_value, "count", i);
The count cannot be added before it’s computed. I find the implementation in cee392a better than the new one. |
|
Right, considering you are more of a maintainer of this extension then I am, feel free to merge this. Do you have commit access (be that either on this account or MCMic)? |
No it seems I do not have permissions to merge or approve the PR at #22550 [EDIT] Found out about https://wiki.php.net/vcs/gitworkflow , currently trying that, will keep you updated ^^ |
Nope, following gitworkflow did not help: $ LC_ALL=en_US.utf8 git push --atomic origin PHP-8.5 master --verbose
Pushing to github.com:php/php-src.git
ERROR: Permission to php/php-src.git denied to MCMic.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists. |
Let me ask the relevant people to give you commit access. |
#22511