zendesk / zendesk/zendesk_api_client_php
Wrong return type for OAuth::getAccessToken
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 344
- Forks
- 247
- Avg merge
- 27m
- Merged PRs (30d)
- 1
Description
On https://github.com/zendesk/zendesk_api_client_php/blob/master/src/Zendesk/API/Utilities/OAuth.php#L22 it states that an array will be returned, but since the second argument for json_decode isn't true it will return a stdClass object instead (unless the API starts responding with a json array instead of a map which I doubt will happen)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/Zendesk/API/Utilities/OAuth.php line 22 and inspect getAccessToken, especially its json_decode call and documented return type. Align the return-type documentation with the object returned for the API response, then verify the method and its documentation agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100