diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index c0bf8e06d..6f8eac91f 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -74,7 +74,10 @@ class StatusController extends Controller return redirect('/login?next='.urlencode('/' . $request->path())); } $id = HashidService::decode($id); - $status = Status::findOrFail($id); + $status = Status::find($id); + if(!$status) { + return redirect('/404'); + } return redirect($status->url()); } diff --git a/app/Jobs/StatusPipeline/StatusDelete.php b/app/Jobs/StatusPipeline/StatusDelete.php index c910d6cd6..09ba5ba5b 100644 --- a/app/Jobs/StatusPipeline/StatusDelete.php +++ b/app/Jobs/StatusPipeline/StatusDelete.php @@ -115,8 +115,6 @@ class StatusDelete implements ShouldQueue $tag->delete(); }); - MediaTag::whereStatusId($status->id) - ->get(); $status->forceDelete(); });