-
Notifications
You must be signed in to change notification settings - Fork 624
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
Bug in sendgrid client library #131
Comments
Indeed this seems to be causing issues. Do we have any kind of update on the problem? Thanks! |
Hey guys, I have a suspicion that while this fixes the issue, it breaks attachments. Can someone verify on their end? My attachments appear but are empty. |
I have just confirmed this on my end. Still would love to hear from someone else but in the meantime please beware. |
I have a pre-release up of v3.0.0 that should fix all of these issues. Would love some testers to provide feedback. I need to write up the changes and a better README, but here's a primer.
https://github.com/sendgrid/sendgrid-php/releases/tag/v3.0.0-RC1 |
I just quickly tried this out and its complaining about Guzzle not being present. Is this some new dependency? |
Yea I wound up going with Guzzle3. I tried pretty hard to stick to native curl. I even started working on another library but in the end I would have had to manually handle form/multipart encoding... That's when I realized that these big HTTP libraries exist for a reason. The issue everyone was getting about the Array to string conversion was because curl requires a single dimension array and we are building a nested one. As people realized, |
So, this also bumps up your required PHP version to 5.4, correct? |
Nah thankfully Guzzle3 supports PHP 5.3 still. On Saturday, April 4, 2015, Serg Chernata notifications@github.com wrote:
Eddie Zaneski |
Hmm, installing via composer Guzzle is refusing to work with PHP under 5.4. Should I be suppressing that warning and ignoring it? Their docs also require 5.4 http://guzzle.readthedocs.org/en/latest/overview.html#installation Disregard this, I'm guessing you're implying that we should install v3 exactly for that reason. |
Yea the docs for Guzzle3 are here. I'll do some testing getting everything installed on PHP 5.3. Maybe I botched a config somewhere. |
It appears that something change on sendgrid server side, it now suddenly send to recipient like this:
to: john, Array
I look into the client library into the file lib/SendGrid.php line 51
curl_setopt($ch, CURLOPT_POSTFIELDS, $form);
I put http_build_query around the $form variable and that seems to stop sendgrid server side from putting Array into the recipient list
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($form));
I think this is also a more proper way to deal with curl.
Could you investigate and incorporate the fix into the version 1.0 of the API
The text was updated successfully, but these errors were encountered: