From 415826f2538e6b7aa826da57ba6e639dae3d7123 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 30 Dec 2021 23:19:38 -0700 Subject: [PATCH] Update ApiV1Controller, fix illegal operator bug by setting default min_id --- app/Http/Controllers/Api/ApiV1Controller.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 5246f64cc..c4adc5d33 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -514,6 +514,11 @@ class ApiV1Controller extends Controller $limit = $request->limit ?? 20; $max_id = $request->max_id; $min_id = $request->min_id; + + if(!$max_id && !$min_id) { + $min_id = 1; + } + $pid = $request->user()->profile_id; $scope = $request->only_media == true ? ['photo', 'photo:album', 'video', 'video:album'] :