{"action":"created","issue":{"url":"https://api.github.com/repos/hwi/HWIOAuthBundle/issues/796","labels_url":"https://api.github.com/repos/hwi/HWIOAuthBundle/issues/796/labels{/name}","comments_url":"https://api.github.com/repos/hwi/HWIOAuthBundle/issues/796/comments","events_url":"https://api.github.com/repos/hwi/HWIOAuthBundle/issues/796/events","html_url":"https://github.com/hwi/HWIOAuthBundle/issues/796","id":82573094,"number":796,"title":"Facebook cancel oauth process cause an error","user":{"login":"feyyazesat","id":1338800,"avatar_url":"https://avatars.githubusercontent.com/u/1338800?v=3","gravatar_id":"","url":"https://api.github.com/users/feyyazesat","html_url":"https://github.com/feyyazesat","followers_url":"https://api.github.com/users/feyyazesat/followers","following_url":"https://api.github.com/users/feyyazesat/following{/other_user}","gists_url":"https://api.github.com/users/feyyazesat/gists{/gist_id}","starred_url":"https://api.github.com/users/feyyazesat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feyyazesat/subscriptions","organizations_url":"https://api.github.com/users/feyyazesat/orgs","repos_url":"https://api.github.com/users/feyyazesat/repos","events_url":"https://api.github.com/users/feyyazesat/events{/privacy}","received_events_url":"https://api.github.com/users/feyyazesat/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hwi/HWIOAuthBundle/labels/Support%20request","name":"Support request","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-29T20:25:19Z","updated_at":"2015-12-03T20:37:53Z","closed_at":"2015-12-03T20:37:53Z","body":"While login or signup through facebook the page which requests user permission\r\nLog in with Facebook page.\r\ntry to cancel process, page redirects to \r\n\r\nhttp://www.localhost/oauth/service/facebook?error=access_denied&error_code=200&error_description=Permissions+error&error_reason=user_denied#_=_\r\nand following error occurs. \r\n\r\nCatchable Fatal Error: Argument 1 passed to HWI\\Bundle\\OAuthBundle\\OAuth\\ResourceOwner\\GenericOAuth2ResourceOwner::getUserInformation() must be of the type array, null given, called in /root/web/www/project/vendor/hwi/oauth-bundle/HWI/Bundle/OAuthBundle/Controller/ConnectController.php on line 186 and defined\r\n\r\nThe problem is in below part, _hwi_oauth.connect_confirmation.'.$key returns null it is never created.\r\nand $resourceOwner->getUserInformation's first parameter array type safe. Sorry I couldn't create a PR for it.\r\n\r\n        if ($resourceOwner->handles($request)) {\r\n            $accessToken = $resourceOwner->getAccessToken(\r\n                $request,\r\n                $this->container->get('hwi_oauth.security.oauth_utils')->getServiceAuthUrl($request, $resourceOwner)\r\n            );\r\n\r\n            // save in session\r\n            $session->set('_hwi_oauth.connect_confirmation.'.$key, $accessToken);\r\n        } else {\r\n            $accessToken = $session->get('_hwi_oauth.connect_confirmation.'.$key);\r\n        }\r\n\r\n        $userInformation = $resourceOwner->getUserInformation($accessToken);"},"comment":{"url":"https://api.github.com/repos/hwi/HWIOAuthBundle/issues/comments/161776405","html_url":"https://github.com/hwi/HWIOAuthBundle/issues/796#issuecomment-161776405","issue_url":"https://api.github.com/repos/hwi/HWIOAuthBundle/issues/796","id":161776405,"user":{"login":"stloyd","id":67402,"avatar_url":"https://avatars.githubusercontent.com/u/67402?v=3","gravatar_id":"","url":"https://api.github.com/users/stloyd","html_url":"https://github.com/stloyd","followers_url":"https://api.github.com/users/stloyd/followers","following_url":"https://api.github.com/users/stloyd/following{/other_user}","gists_url":"https://api.github.com/users/stloyd/gists{/gist_id}","starred_url":"https://api.github.com/users/stloyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stloyd/subscriptions","organizations_url":"https://api.github.com/users/stloyd/orgs","repos_url":"https://api.github.com/users/stloyd/repos","events_url":"https://api.github.com/users/stloyd/events{/privacy}","received_events_url":"https://api.github.com/users/stloyd/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T20:37:53Z","updated_at":"2015-12-03T20:37:53Z","body":"This should be fixed by #915."}}