From 7a2e39212ee60e31691c9617b14afa3aa8983884 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sat, 27 Jun 2020 13:37:18 +0100 Subject: [PATCH] Fixed empty search scenario --- app/Entities/SearchOptions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Entities/SearchOptions.php b/app/Entities/SearchOptions.php index af9156953..a121bd793 100644 --- a/app/Entities/SearchOptions.php +++ b/app/Entities/SearchOptions.php @@ -45,6 +45,10 @@ class SearchOptions */ public static function fromRequest(Request $request): SearchOptions { + if (!$request->has('search') && !$request->has('term')) { + return static::fromString(''); + } + if ($request->has('term')) { return static::fromString($request->get('term')); }