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 committed Nov 14, 2024
1 parent 9d5de20 commit 8015a2f
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,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 8015a2f

Please sign in to comment.