pheal fails to generate proper api urls on some PHP installs #28

Closed
marekr opened this Issue Sep 29, 2012 · 2 comments

Projects

None yet

2 participants

marekr commented Sep 29, 2012

For some php installs, http_build_query joins together parameters with & instead of &, this means the api requested fail as the api key isn't properly submitted to the api server.

        $url .= "?" . http_build_query($opts);

needs to be changed to

        $url .= "?" . http_build_query($opts,'','&');

in pheal.php

Owner

http_build_query uses the ini arg-separator settings.
If your ini is set to create invalid urls, then you should fix your ini.

http://php.net/manual/en/ini.core.php#ini.arg-separator.output

@ppetermann ppetermann closed this Sep 29, 2012
marekr commented Sep 29, 2012

On 9/29/2012 5:12 AM, Peter Petermann wrote:

http_build_query uses the ini arg-separator settings.
If your ini is set to create invalid urls, then you should fix your ini.

http://php.net/manual/en/ini.core.php#ini.arg-separator.output


Reply to this email directly or view it on GitHub
#28 (comment).

I love how you are saying &amp makes a url invalid, for a browser it is
completely valid, they automatically converted. For curl, it's invalid.

All php windows installs have & set for the separator by default.

@ppetermann ppetermann added a commit that referenced this issue Sep 30, 2012
@ppetermann fixes #28 a68b7f3
@ppetermann ppetermann added a commit that referenced this issue Sep 30, 2012
@ppetermann fixes #28 9baff36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment