mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Catch various validation errors
This commit is contained in:
@@ -106,7 +106,11 @@ class SearchController extends Controller
|
||||
*/
|
||||
public function search(Request $request, SearchInterface $searcher): JsonResponse
|
||||
{
|
||||
$fullQuery = (string)$request->get('query');
|
||||
$entry = $request->get('query');
|
||||
if (!is_scalar($entry)) {
|
||||
$entry = '';
|
||||
}
|
||||
$fullQuery = (string)$entry;
|
||||
$page = 0 === (int)$request->get('page') ? 1 : (int)$request->get('page');
|
||||
|
||||
$searcher->parseQuery($fullQuery);
|
||||
|
@@ -215,7 +215,12 @@ class ReportFormRequest extends FormRequest
|
||||
$repository = app(TagRepositoryInterface::class);
|
||||
$set = $this->get('tag');
|
||||
$collection = new Collection();
|
||||
Log::debug('Set is:', $set ?? []);
|
||||
if (is_array($set)) {
|
||||
Log::debug('Set is:', $set);
|
||||
}
|
||||
if (!is_array($set)) {
|
||||
Log::error(sprintf('Set is not an array! "%s"', $set));
|
||||
}
|
||||
if (is_array($set)) {
|
||||
foreach ($set as $tagTag) {
|
||||
Log::debug(sprintf('Now searching for "%s"', $tagTag));
|
||||
|
Reference in New Issue
Block a user