Merge pull request #4769 from Icinga/fix-setup-wizard

Fix setup wizard
This commit is contained in:
Johannes Meyer 2022-05-03 14:15:44 +02:00 committed by GitHub
commit 6d1d60c35d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ $pages = $wizard->getPages();
$finished = isset($success);
$configPages = array_slice($pages, 3, count($pages) - 4, true);
$currentPos = array_search($wizard->getCurrentPage(), $pages, true);
list($configPagesLeft, $configPagesRight) = array_chunk($configPages, count($configPages) / 2, true);
list($configPagesLeft, $configPagesRight) = array_chunk($configPages, (int)(count($configPages) / 2), true);
$visitedPages = array_keys($wizard->getPageData());
$maxProgress = max(array_merge([0], array_keys(array_filter(

View File

@ -290,7 +290,7 @@ class RequirementSet implements RecursiveIterator
*/
public function valid(): bool
{
return $this->key() !== null;
return key($this->requirements) !== null;
}
/**