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

getallheaders() may not return array #6

Closed
ericnicolaas opened this issue Aug 28, 2017 · 1 comment
Closed

getallheaders() may not return array #6

ericnicolaas opened this issue Aug 28, 2017 · 1 comment

Comments

@ericnicolaas
Copy link

ericnicolaas commented Aug 28, 2017

I'm using this plugin on a SiteGround Cloud hosting account and seeing this warning in my logs every two minutes:

PHP Warning:  Invalid argument supplied for foreach() in /path/to/wordpress/wp-content/plugins/rest-api-oauth1/lib/class-wp-rest-oauth1.php on line 80

getallheaders may return FALSE on failure, which is what I assume is happening here. I'll submit a PR with a basic fix.

As to why getallheaders is returning false, I'm not sure. We have Varnish Cache on this site, and I know that affects cookies, so it could be related to that. We also have Cloudflare though I assume Cloudflare would play nice with headers.

@ericnicolaas
Copy link
Author

Ugh, wrong repo. Opened this at WP-API/OAuth1#209

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

No branches or pull requests

1 participant