Skip to content

Commit

Permalink
pkp/pkp-lib#10511 Fix bug of listing empty series when trying to inse…
Browse files Browse the repository at this point in the history
…rt a menu item with the series type.

Signed-off-by: yves <[email protected]>
  • Loading branch information
YvesLepidus authored and kaitlinnewson committed Nov 22, 2024
1 parent ef4fa4e commit 68938cb
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ public function fetch($request, $template = null, $display = false)
->getCollector()
->filterByContextIds([$contextId])
->getMany();
$seriesTitles = $series->map(fn (Section $seriesObj) => [
$seriesObj->getId() => $seriesObj->getLocalizedTitle()
]);

$seriesTitles = [];
foreach ($series as $seriesObj) {
$seriesTitles[$seriesObj->getId()] = $seriesObj->getLocalizedTitle();
}

$categories = Repo::category()->getCollector()
->filterByParentIds([null])
Expand Down

0 comments on commit 68938cb

Please sign in to comment.