mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-26 20:22:18 +00:00
Fixed empty search scenario
This commit is contained in:
parent
715dee2d0e
commit
7a2e39212e
@ -45,6 +45,10 @@ class SearchOptions
|
|||||||
*/
|
*/
|
||||||
public static function fromRequest(Request $request): SearchOptions
|
public static function fromRequest(Request $request): SearchOptions
|
||||||
{
|
{
|
||||||
|
if (!$request->has('search') && !$request->has('term')) {
|
||||||
|
return static::fromString('');
|
||||||
|
}
|
||||||
|
|
||||||
if ($request->has('term')) {
|
if ($request->has('term')) {
|
||||||
return static::fromString($request->get('term'));
|
return static::fromString($request->get('term'));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user