diff --git a/src/90f2ee7a-c041-4316-ad54-af4f97fa3003/code.php b/src/90f2ee7a-c041-4316-ad54-af4f97fa3003/code.php index 95a1b05..b2fca44 100644 --- a/src/90f2ee7a-c041-4316-ad54-af4f97fa3003/code.php +++ b/src/90f2ee7a-c041-4316-ad54-af4f97fa3003/code.php @@ -85,10 +85,13 @@ final class DailyScripture { $response = $http->get($config->daily_scripture_url); + $body = $response->body ?? null; + $code = $response->code ?? 400; + // make sure we got the correct response - if ($response->code == 200 && isset($response->body) && is_string($response->body)) + if ($code == 200 && is_string($body)) { - $this->reference = $response->body; + $this->reference = $body; $this->parse($this->reference); } diff --git a/src/90f2ee7a-c041-4316-ad54-af4f97fa3003/code.power b/src/90f2ee7a-c041-4316-ad54-af4f97fa3003/code.power index cdc5bde..cd024de 100644 --- a/src/90f2ee7a-c041-4316-ad54-af4f97fa3003/code.power +++ b/src/90f2ee7a-c041-4316-ad54-af4f97fa3003/code.power @@ -59,10 +59,13 @@ { $response = $http->get($config->daily_scripture_url); + $body = $response->body ?? null; + $code = $response->code ?? 400; + // make sure we got the correct response - if ($response->code == 200 && isset($response->body) && is_string($response->body)) + if ($code == 200 && is_string($body)) { - $this->reference = $response->body; + $this->reference = $body; $this->parse($this->reference); }