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

Avoid relying on the default php.ini argument separator #14

Merged
merged 1 commit into from
Apr 28, 2017

Conversation

stof
Copy link
Contributor

@stof stof commented Feb 23, 2017

Changing the default separator to something else than & in the php.ini is probably not that common, but it is possible. As this is a shared library, it cannot rely on the php.ini not being modified. So passing the separator explicitly is better.

@@ -144,7 +144,7 @@ private function request($method, $path, array $params)

// append request parameters to the URL
if ('GET' === $method || 'DELETE' === $method) {
$path .= '?'.http_build_query($params);
$path .= '?'.http_build_query($params, null, '&');
Copy link
Owner

Choose a reason for hiding this comment

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

I guess the second parameter should be the empty string (see https://3v4l.org/gGkfE), shouldn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@xabbuh
Copy link
Owner

xabbuh commented Apr 28, 2017

Thank you @stof.

@xabbuh xabbuh merged commit 70f39ec into xabbuh:master Apr 28, 2017
xabbuh added a commit that referenced this pull request Apr 28, 2017
This PR was merged into the 1.2.x-dev branch.

Discussion
----------

Avoid relying on the default php.ini argument separator

Changing the default separator to something else than ``&`` in the php.ini is probably not that common, but it is possible. As this is a shared library, it cannot rely on the php.ini not being modified. So passing the separator explicitly is better.

Commits
-------

70f39ec Avoid relying on the default php.ini argument separator
@stof stof deleted the patch-1 branch April 29, 2017 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants