-
-
Notifications
You must be signed in to change notification settings - Fork 47
Fix GitHub API response handling after Framework Update #379
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
Fix GitHub API response handling after Framework Update #379
Conversation
| if ($response->getStatusCode() != $expectedCode) { | ||
| // Decode the error response and throw an exception. | ||
| $body = json_decode($response->body); | ||
| $body = json_decode((string) $response->getBody(), true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $body = json_decode((string) $response->getBody(), true); | |
| $body = json_decode((string) $response->getBody()); |
| try { | ||
| $rateResponse = Helper::initializeGithub()->getRateLimit(); | ||
| $rate = json_decode($rateResponse->body); | ||
| $rate = json_decode($rateResponse->getBody()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $rate = json_decode($rateResponse->getBody()); | |
| $rate = json_decode((string) $rateResponse->getBody()); |
| try { | ||
| $rateResponse = $github->getRateLimit(); | ||
| $rate = json_decode($rateResponse->body, false); | ||
| $rate = json_decode($rateResponse->getBody(), false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $rate = json_decode($rateResponse->getBody(), false); | |
| $rate = json_decode((string) $rateResponse->getBody(), false); |
| $id | ||
| ); | ||
| $pull = json_decode($pullResponse->body, false); | ||
| $pull = json_decode($pullResponse->getBody(), false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $pull = json_decode($pullResponse->getBody(), false); | |
| $pull = json_decode((string) $pullResponse->getBody(), false); |
| ); | ||
| $contents = json_decode( | ||
| $contentsResponse->body, | ||
| $contentsResponse->getBody(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $contentsResponse->getBody(), | |
| (string) $contentsResponse->getBody(), |
Pull Request for Issue # .
Summary of Changes
Fix for fetching Github API data after Joomla Framework update.
Ref:
joomla/joomla-cms#45825
joomla/joomla-cms#45827
Testing Instructions