Catch various validation errors

This commit is contained in:
James Cole
2023-01-20 22:08:18 +01:00
parent 614d54c9bd
commit cd408e581b
7 changed files with 68 additions and 15 deletions

View File

@@ -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));