From ff860c9b85a4ae8154a445515fb99af26b28cb3e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 30 Aug 2018 23:06:13 -0600 Subject: [PATCH] Fix discover bug --- app/Http/Controllers/DiscoverController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/DiscoverController.php b/app/Http/Controllers/DiscoverController.php index 9885c4c40..1e96cf058 100644 --- a/app/Http/Controllers/DiscoverController.php +++ b/app/Http/Controllers/DiscoverController.php @@ -29,7 +29,10 @@ class DiscoverController extends Controller ->whereIn('filter_type', ['mute', 'block']) ->pluck('filterable_id'); $following->push($pid); - $following->push($filtered); + + if($filtered->count() > 0) { + $following->push($filtered); + } $people = Profile::inRandomOrder() ->whereNotIn('id', $following)