4
0
Fork 0

update 2024-01-24 15:37:32

This commit is contained in:
Robot 2024-01-24 15:37:32 +02:00
parent b4ed6ae4a5
commit 67794f035c
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
2 changed files with 10 additions and 4 deletions

View File

@ -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);
}

View File

@ -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);
}