Skip to content

Commit

Permalink
Merge pull request #39 from packbackbooks/type-error
Browse files Browse the repository at this point in the history
PODB-266 Make return type optional
  • Loading branch information
dbhynds authored Nov 29, 2021
2 parents c7b45e1 + 834849d commit a376c85
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.1.2

Fixed a typing error when the response body of a request is null.

## 4.1.1

* Updated `LtiMessageLaunch` to fetch JWKs via an HTTP client instead of `file_get_contents()`. ([#38](https://github.com/packbackbooks/lti-1-3-php-library/pull/38))
Expand Down
2 changes: 1 addition & 1 deletion src/Interfaces/ILtiServiceConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function getAccessToken(ILtiRegistration $registration, array $scopes);

public function makeRequest(IServiceRequest $request);

public function getResponseBody(Response $request): array;
public function getResponseBody(Response $request): ?array;

public function makeServiceRequest(
ILtiRegistration $registration,
Expand Down
2 changes: 1 addition & 1 deletion src/LtiServiceConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function makeRequest(IServiceRequest $request)
);
}

public function getResponseBody(Response $response): array
public function getResponseBody(Response $response): ?array
{
$responseBody = (string) $response->getBody();

Expand Down

0 comments on commit a376c85

Please sign in to comment.