mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 03:43:07 +00:00
Catch empty string.
This commit is contained in:
@@ -70,8 +70,8 @@ class AccountController extends Controller
|
|||||||
{
|
{
|
||||||
Log::debug('Now in account search()');
|
Log::debug('Now in account search()');
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$query = $request->get('query');
|
$query = trim((string)$request->get('query'));
|
||||||
$field = $request->get('field');
|
$field = trim((string)$request->get('field'));
|
||||||
$type = $request->get('type') ?? 'all';
|
$type = $request->get('type') ?? 'all';
|
||||||
if ('' === $query || !in_array($field, $this->validFields, true)) {
|
if ('' === $query || !in_array($field, $this->validFields, true)) {
|
||||||
return response(null, 422);
|
return response(null, 422);
|
||||||
|
Reference in New Issue
Block a user