[PHP-CVS] [php-src] master: standard: Fix parameter name in the convert_uudecode() warning (#23306)
[email protected] (Louis-Arnaud via GitHub)
| Newsgroups | php.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Louis-Arnaud (lacatoire) Committer: GitHub (web-flow) Pusher: TimWolla Date: 2026-08-23T16:10:36+02:00 Commit: https://github.com/php/php-src/commit/6316ced6d7dc8c4b816aa471a46a2369b1d2cb6e Raw diff: https://github.com/php/php-src/commit/6316ced6d7dc8c4b816aa471a46a2369b1d2cb6e.diff standard: Fix parameter name in the convert_uudecode() warning (#23306) 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. Co-authored-by: lacatoire <[email protected]> Changed paths: M ext/standard/tests/strings/bug67252.phpt M ext/standard/tests/strings/uuencode.phpt M ext/standard/uuencode.c Diff: diff --git a/ext/standard/tests/strings/bug67252.phpt b/ext/standard/tests/strings/bug67252.phpt index bd758a1c79fd..60ae319f76d2 100644 --- a/ext/standard/tests/strings/bug67252.phpt +++ b/ext/standard/tests/strings/bug67252.phpt @@ -8,5 +8,5 @@ var_dump(convert_uudecode($a)); ?> --EXPECTF-- -Warning: convert_uudecode(): Argument #1 ($data) is not a valid uuencoded string in %s on line %d +Warning: convert_uudecode(): Argument #1 ($string) is not a valid uuencoded string in %s on line %d bool(false) diff --git a/ext/standard/tests/strings/uuencode.phpt b/ext/standard/tests/strings/uuencode.phpt index d03c2b1bf0f3..82ded4165769 100644 --- a/ext/standard/tests/strings/uuencode.phpt +++ b/ext/standard/tests/strings/uuencode.phpt @@ -29,9 +29,9 @@ string(36) "6;F]T('9E<GD@<V]P:&ES=&EC871E9``` " string(22) "not very sophisticated" -Warning: convert_uudecode(): Argument #1 ($data) is not a valid uuencoded string in %s on line %d +Warning: convert_uudecode(): Argument #1 ($string) is not a valid uuencoded string in %s on line %d bool(false) -Warning: convert_uudecode(): Argument #1 ($data) is not a valid uuencoded string in %s on line %d +Warning: convert_uudecode(): Argument #1 ($string) is not a valid uuencoded string in %s on line %d bool(false) Done diff --git a/ext/standard/uuencode.c b/ext/standard/uuencode.c index af70e3a2aa2c..6dc2848fec0f 100644 --- a/ext/standard/uuencode.c +++ b/ext/standard/uuencode.c @@ -222,7 +222,7 @@ PHP_FUNCTION(convert_uudecode) ZEND_PARSE_PARAMETERS_END(); if ((dest = php_uudecode(ZSTR_VAL(src), ZSTR_LEN(src))) == NULL) { - php_error_docref(NULL, E_WARNING, "Argument #1 ($data) is not a valid uuencoded string"); + php_error_docref(NULL, E_WARNING, "Argument #1 ($string) is not a valid uuencoded string"); RETURN_FALSE; }