{"action":"closed","issue":{"url":"https://api.github.com/repos/abraham/twitteroauth/issues/25","labels_url":"https://api.github.com/repos/abraham/twitteroauth/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/abraham/twitteroauth/issues/25/comments","events_url":"https://api.github.com/repos/abraham/twitteroauth/issues/25/events","html_url":"https://github.com/abraham/twitteroauth/issues/25","id":181186,"number":25,"title":"getAccessToken() gives PHP warning when the oAuthRequest doesn't succeed","user":{"login":"danbirken","id":91798,"avatar_url":"https://avatars.githubusercontent.com/u/91798?v=3","gravatar_id":"","url":"https://api.github.com/users/danbirken","html_url":"https://github.com/danbirken","followers_url":"https://api.github.com/users/danbirken/followers","following_url":"https://api.github.com/users/danbirken/following{/other_user}","gists_url":"https://api.github.com/users/danbirken/gists{/gist_id}","starred_url":"https://api.github.com/users/danbirken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbirken/subscriptions","organizations_url":"https://api.github.com/users/danbirken/orgs","repos_url":"https://api.github.com/users/danbirken/repos","events_url":"https://api.github.com/users/danbirken/events{/privacy}","received_events_url":"https://api.github.com/users/danbirken/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/abraham/twitteroauth/labels/Explore","name":"Explore","color":"ffea00"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2010-04-27T21:13:05Z","updated_at":"2015-01-07T07:43:41Z","closed_at":"2015-01-07T07:43:41Z","body":"Undefined index: oauth_token in /var/www/html/includes/twitteroauth/twitteroauth.php on line 118\r\nUndefined index: oauth_token_secret in /var/www/html/includes/twitteroauth/twitteroauth.php on line 118\r\n\r\nAlthough I have received this error multiple times, I do not have any instances of storing bad data, presumably because I ensure the http_code is 200 before accepting the token values.\r\n\r\nSince nowhere else in the library do you check the http_code before performing operations, I didn't want to go ahead and add that in (because you might prefer isset() or something on the $token or there might be an issue with return codes that I'm not considering) and give you first shot at it.  \r\n\r\nI also have this same error as occurring in getRequestToken (line 82), and I assume it would also occur in getXAuthToken(), though I don't use this function."}}