Skip to content

Use print_r instead of echo on Arrays. #396

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

Merged
merged 1 commit into from
May 18, 2017
Merged

Use print_r instead of echo on Arrays. #396

merged 1 commit into from
May 18, 2017

Conversation

ryanpcmcquen
Copy link

Avoids:

PHP Notice:  Array to string conversion

@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label May 17, 2017
@SendGridDX
Copy link

SendGridDX commented May 17, 2017

CLA assistant check
All committers have signed the CLA.

@thinkingserious
Copy link
Contributor

Hi @ryanpcmcquen,

Thanks for taking the time to make a PR, we really appreciate it!

Only the $response->headers() is an array, could you please adjust accordingly?

Also, for consistency, can you please adjust the other areas in the SDK where we are using echo on arrays, such as in README.md.

Thanks!

With Best Regards,

Elmer

Avoids:
```
PHP Notice:  Array to string conversion
```
@ryanpcmcquen
Copy link
Author

Thanks! Should be good to go now, here's what I did for reference:

for F in `grep -lr 'echo $response' .`; do
  sed -i.backybackybackup 's/echo $response->headers()/print_r($response->headers())/g' $F;
done
for F in `find . -name "*.backybackybackup"`; do
  rm $F;
done

@thinkingserious thinkingserious merged commit 46f5910 into sendgrid:master May 18, 2017
@thinkingserious
Copy link
Contributor

Hello @ryanpcmcquen,

Thanks again for the PR!

We want to show our appreciation by sending you some swag. Could you please fill out this form so we can send it to you? Thanks!

Team SendGrid DX

@ryanpcmcquen
Copy link
Author

Thank you, you're awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: code review request requesting a community code review or review from Twilio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants