mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 22:04:25 +02:00
/setup/: ensure not to pass an empty array to max()
... as PHP 8 doesn't tolerate such. refs #4287
This commit is contained in:
parent
f782c08d80
commit
2c5f141cc1
@ -9,10 +9,10 @@ $currentPos = array_search($wizard->getCurrentPage(), $pages, true);
|
|||||||
list($configPagesLeft, $configPagesRight) = array_chunk($configPages, count($configPages) / 2, true);
|
list($configPagesLeft, $configPagesRight) = array_chunk($configPages, count($configPages) / 2, true);
|
||||||
|
|
||||||
$visitedPages = array_keys($wizard->getPageData());
|
$visitedPages = array_keys($wizard->getPageData());
|
||||||
$maxProgress = @max(array_keys(array_filter(
|
$maxProgress = max(array_merge([0], array_keys(array_filter(
|
||||||
$pages,
|
$pages,
|
||||||
function ($page) use ($visitedPages) { return in_array($page->getName(), $visitedPages); }
|
function ($page) use ($visitedPages) { return in_array($page->getName(), $visitedPages); }
|
||||||
)));
|
))));
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div id="setup-content-wrapper" data-base-target="layout">
|
<div id="setup-content-wrapper" data-base-target="layout">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user