Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GH-11184] urlencode return an empty string when input is empty #11292

Draft
wants to merge 2 commits into
base: 6.x
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions dictionaries/override/CallMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -50216,13 +50216,23 @@
),
'rawurldecode' =>
array (
0 => 'string',
'string' => 'string',
0 => '\'\'',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not used to the new callmap format yet but the way I understand it, this is supposed to be the return type. Shouldn't that be string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure of the format either, what I'm trying to do is tell that if the input is an empty string ('') the return type is an empty string too, and if the input is a non empty string, so is the output

I need to test it

Copy link
Collaborator

@orklah orklah Feb 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that could work, even if we rarely go this precise in callmaps, however in this case you'll be missing the main case (you handle empty-string, non-empty-string but you should also handle any-string :p)

'string' => '\'\'',
),
'rawurldecode\'1' =>
array (
0 => 'non-empty-string',
'string' => 'non-empty-string',
),
'rawurlencode' =>
array (
0 => 'string',
'string' => 'string',
0 => '\'\'',
'string' => '\'\'',
),
'rawurlencode\'1' =>
array (
0 => 'non-empty-string',
'string' => 'non-empty-string',
),
'readdir' =>
array (
Expand Down Expand Up @@ -73401,13 +73411,23 @@
),
'urldecode' =>
array (
0 => 'string',
'string' => 'string',
0 => '\'\'',
'string' => '\'\'',
),
'urldecode\'1' =>
array (
0 => 'non-empty-string',
'string' => 'non-empty-string',
),
'urlencode' =>
array (
0 => 'string',
'string' => 'string',
0 => '\'\'',
'string' => '\'\'',
),
'urlencode\'1' =>
array (
0 => 'non-empty-string',
'string' => 'non-empty-string',
),
'use_soap_error_handler' =>
array (
Expand Down
Loading