ext/sodium: Fix parameter name in the length-mismatch errors - #23396
Open
lacatoire wants to merge 2 commits into
Open
ext/sodium: Fix parameter name in the length-mismatch errors#23396lacatoire wants to merge 2 commits into
lacatoire wants to merge 2 commits into
Conversation
sodium_add(), sodium_memcmp() and sodium_compare() all cross-reference their second argument as $string_2, a name none of them declares; the stub calls it $string2.
NickSdot
reviewed
Aug 20, 2026
Co-authored-by: NickSdot <32384907+NickSdot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The length-mismatch errors of
sodium_add(),sodium_memcmp()andsodium_compare()refer to$string_2, which does not exist. All three functions declare$string2.The
Argument #1 ($string1)part is generated from the arginfo and was already correct; only the hardcoded cross-reference to the second argument was stale.The added test triggers the mismatch on all three functions and lists
sodium_add()'s parameter names through Reflection, so a later rename that forgets these messages fails the test.