Fix code style and add checks
This commit is contained in:
committed by
M. Shull
parent
232ef05e81
commit
7fba1be402
@ -39,6 +39,7 @@ class Beamer extends SimpleWorker {
|
||||
$posts = $this->wp->wpRemoteRetrieveBody($response);
|
||||
if (empty($posts)) return false;
|
||||
$posts = json_decode($posts);
|
||||
if (empty($posts) || empty($posts[0]->date)) return false;
|
||||
$this->settings->set('last_announcement_date', Carbon::createFromTimeString($posts[0]->date)->getTimestamp());
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user