Skip to content

Fix parameter name in the convert_uudecode() warning - #23306

Open
lacatoire wants to merge 1 commit into
php:masterfrom
lacatoire:fix/convert-uudecode-warning-param-name
Open

Fix parameter name in the convert_uudecode() warning#23306
lacatoire wants to merge 1 commit into
php:masterfrom
lacatoire:fix/convert-uudecode-warning-param-name

Conversation

@lacatoire

Copy link
Copy Markdown
Member

convert_uudecode() declares its parameter as $string, but its warning names $data:

convert_uudecode(): Argument #1 ($data) is not a valid uuencoded string

Following the message and calling convert_uudecode(data: 'x') raises Error: Unknown named parameter $data, while string: works. Reproduced on 8.4.22 and 8.5.9.

The message is a literal rather than a generated one, which is why it did not follow the parameter. This is the only place in the tree where a hardcoded $data does not match the declared parameter; the other hits (bzcompress, bzdecompress, gmp_import, http_build_query) all belong to functions whose parameter really is named $data.

Three tests pinned the old wording and are updated in the same commit.

Targeting master rather than a stable branch, since the warning text is observable output.

The warning names $data, but the parameter has been declared as $string
since the stub was introduced, so following the message and calling
convert_uudecode(data: ...) raises Error: Unknown named parameter $data.

The message is a literal rather than a generated one, which is why it did
not follow the parameter. Three tests pinning the old wording are updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant