From aa0149ea2eecb64d97b9464d143c0aca096a3ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Thu, 2 Dec 2021 02:08:28 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AD=E3=83=AA=E3=82=B3=E3=83=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Video/Prayer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Video/Prayer.php b/app/Http/Controllers/Video/Prayer.php index 341a7bc..b13cb7b 100644 --- a/app/Http/Controllers/Video/Prayer.php +++ b/app/Http/Controllers/Video/Prayer.php @@ -98,6 +98,7 @@ class Prayer extends Engine { if (!$get) return $err; $get = json_decode($get); + if (isset($get->status) && $get->status == 404) return []; $come = array(); $come['come'] = array(); @@ -116,7 +117,7 @@ class Prayer extends Engine { $g->comments->id = $g->id; $g->comments->name = $g->account->displayName; $g->comments->channel = $g->account->url; - $g->comments->icon = env('PEER_URI').$g->account->avatar->path; + $g->comments->icon = !is_null($g->account->avatar) ? env('PEER_URI').$g->account->avatar->path : '/img/noicon.jpg'; $g->comments->message = strip_tags($g->text, array('
')); $g->comments->createdTS = strtotime($g->createdAt); $g->comments->created = date('Y年m月d日 H:i:s', strtotime($g->createdAt));