Expand logging

This commit is contained in:
James Cole
2023-08-30 15:57:59 +02:00
parent 592fc71b4e
commit 0bf97ccf22
5 changed files with 101 additions and 60 deletions

View File

@@ -222,19 +222,18 @@ class ReportFormRequest extends FormRequest
}
if (!is_array($set)) {
Log::error(sprintf('Set is not an array! "%s"', $set));
return $collection;
}
if (is_array($set)) {
foreach ($set as $tagTag) {
Log::debug(sprintf('Now searching for "%s"', $tagTag));
$tag = $repository->findByTag($tagTag);
if (null !== $tag) {
$collection->push($tag);
continue;
}
$tag = $repository->find((int)$tagTag);
if (null !== $tag) {
$collection->push($tag);
}
foreach ($set as $tagTag) {
Log::debug(sprintf('Now searching for "%s"', $tagTag));
$tag = $repository->findByTag($tagTag);
if (null !== $tag) {
$collection->push($tag);
continue;
}
$tag = $repository->find((int)$tagTag);
if (null !== $tag) {
$collection->push($tag);
}
}