Skip to content

Commit

Permalink
Issue #2081: tidying, don't assign the complete array
Browse files Browse the repository at this point in the history
when only a single element is needed
  • Loading branch information
bschmalhofer committed Jan 6, 2023
1 parent 551b252 commit 3f9b8b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Kernel/System/Ticket/Article/Backend/Base.pm
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,12 @@ sub _MetaArticleGet {
}

# Use ArticleList() internally to benefit from its ticket-level cache.
my @MetaArticleIndex = $Kernel::OM->Get('Kernel::System::Ticket::Article')->ArticleList(
my ($FirstMetaArticle) = $Kernel::OM->Get('Kernel::System::Ticket::Article')->ArticleList(
TicketID => $Param{TicketID},
ArticleID => $Param{ArticleID},
);

return %{ $MetaArticleIndex[0] // {} };
return %{ $FirstMetaArticle // {} };
}

=head2 _MetaArticleDelete()
Expand Down

0 comments on commit 3f9b8b9

Please sign in to comment.