/setup/: ensure not to pass an empty array to max()

... as PHP 8 doesn't tolerate such.

refs #4287
This commit is contained in:
Alexander A. Klimov 2020-12-02 19:22:19 +01:00 committed by Johannes Meyer
parent f782c08d80
commit 2c5f141cc1
1 changed files with 2 additions and 2 deletions

View File

@ -9,10 +9,10 @@ $currentPos = array_search($wizard->getCurrentPage(), $pages, true);
list($configPagesLeft, $configPagesRight) = array_chunk($configPages, count($configPages) / 2, true);
$visitedPages = array_keys($wizard->getPageData());
$maxProgress = @max(array_keys(array_filter(
$maxProgress = max(array_merge([0], array_keys(array_filter(
$pages,
function ($page) use ($visitedPages) { return in_array($page->getName(), $visitedPages); }
)));
))));
?>
<div id="setup-content-wrapper" data-base-target="layout">