Skip to content

Commit

Permalink
Ensure response content is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Jun 21, 2023
1 parent d0073bd commit 04fdcd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/services/CacheRequestService.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,15 @@ public function getCachedResponse(SiteUriModel $siteUri): ?Response
*/
public function saveAndPrepareResponse(?Response $response, SiteUriModel $siteUri): void
{
if ($response === null) {
if ($response === null || $response->content === null) {
return;
}

if (!$response->getIsOk()) {
if ($response->getIsOk() === false) {
return;
}

if (!$this->getIsCacheableResponse($response)) {
if ($this->getIsCacheableResponse($response) === false) {
return;
}

Expand Down

0 comments on commit 04fdcd4

Please sign in to comment.