mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-07 03:14:33 +08:00
Fixed empty search scenario
This commit is contained in:
@ -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'));
|
||||
}
|
||||
|
Reference in New Issue
Block a user