More PHP wrapper issues?
I have serious issues using the PHP wrapper.
e.g.:
$plan = $client->getPlan('FREE'); $allplans = $client->getPlans();
I have 2 plans configured, I would expect the second call return
all plans instead of the plan previously fetched using the first
call.
What's going on?
Discussions are closed to public comments.
If you need help with Cheddar please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by ra.keizer on 25 May, 2012 04:36 PM
I am using PHP Version 5.3.10
2 Posted by ra.keizer on 25 May, 2012 07:23 PM
I found the solution to this problem.
There is a major bug in CurlAdapter.php.
in the 'else' part where your're checking if the resource exists you forgot to pass the url
curl_setopt($this->_resource, CURLOPT_URL, $url);
the code should be:
3 Posted by ra.keizer on 25 May, 2012 07:26 PM
to be frank I think the code in there is a mess... excuse me...
I think you should create the context without url parameter if the resource doesn't exist, then init the context with it's default parameters.
After that you should pass the request specific parameters like the url, password, user and post parameters.
Support Staff 4 Posted by Marc Guyer on 25 May, 2012 09:34 PM
I see. Thanks for pointing out the problem. The PHP wrapper is open source and the new curl adapter was contributed by the community in a recent version. Rather than making accusatory comments here or here (or anywhere), you might consider forking the repo and contributing the fix.
We're here to help and make every effort to do so. We will continue to do so despite your inflammatory comments though it is my hope that our discourse proceeds in a more civil manner.
5 Posted by ra.keizer on 25 May, 2012 09:42 PM
I did not mean to be accusatory, i wanted to be helpfull.
I found a nasty bug, you could be a little more thankfull.
ra.keizer closed this discussion on 26 May, 2012 03:12 PM.