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

clean up PHP warnings #50

Closed
dshanske opened this issue Jan 5, 2017 · 4 comments
Closed

clean up PHP warnings #50

dshanske opened this issue Jan 5, 2017 · 4 comments

Comments

@dshanske
Copy link
Member

dshanske commented Jan 5, 2017

I noticed this in the log...Something tried to pull from my endpoint..not me...it shouldn't generate notices. May try to fix this.

017/01/03 07:59:04 [error] 6832#6832: *12666 FastCGI sent in stderr: "PHP message: Micropub Data: a:1:{s:8:"micropub";s:8:"endpoint";} a:1:{s:8:"micropub";s:8:"endpoint";}
PHP message: PHP Notice: Undefined index: authorization in /srv/html/tiny.n9n.us/wp-content/plugins/wordpress-micropub/micropub.php on line 882
PHP message: PHP Notice: Undefined index: access_token in /srv/html/tiny.n9n.us/wp-content/plugins/wordpress-micropub/micropub.php on line 157" while reading response header from upstream, client: 123.125.71.20, server: tiny.n9n.us, request: "GET /?micropub=endpoint HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "tiny.n9n.us"

@snarfed snarfed changed the title Empty Request clean up PHP warnings Jun 26, 2017
@dshanske
Copy link
Member Author

I've been looking at this one. These lines relate to Quill doing a GET request for ?q=config

The plugin tries to authenticate for a config query. The specification is unclear as to whether that is required. But the issue comes

$auth = static::get_header( 'authorization' );
$token = $_POST['access_token'];

If there is not an access_token in the post, this generates an error.

@snarfed
Copy link
Member

snarfed commented Dec 18, 2017

yup, common pattern in this plugin, and PHP in general. i've cleaned up many similar issues in the micropub plugin, but not these in particular. low priority.

@dshanske
Copy link
Member Author

I will likely try after the other PR is done.

@dshanske
Copy link
Member Author

Resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants