mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix for #1617
This commit is contained in:
@@ -45,6 +45,7 @@ class TagList implements BinderInterface
|
||||
{
|
||||
if (auth()->check()) {
|
||||
$list = array_unique(array_map('\strtolower', explode(',', $value)));
|
||||
Log::debug('List of tags is', $list);
|
||||
if (0 === \count($list)) {
|
||||
Log::error('Tag list is empty.');
|
||||
throw new NotFoundHttpException; // @codeCoverageIgnore
|
||||
@@ -56,7 +57,14 @@ class TagList implements BinderInterface
|
||||
|
||||
$collection = $allTags->filter(
|
||||
function (Tag $tag) use ($list) {
|
||||
return \in_array(strtolower($tag->tag), $list, true);
|
||||
if(\in_array(strtolower($tag->tag), $list, true)) {
|
||||
return true;
|
||||
}
|
||||
if(\in_array((string)$tag->id, $list, true)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user