Fix for iterator arguments

This commit is contained in:
Christian Krause 2023-05-23 17:40:07 +02:00
parent f54dded1e0
commit e8ea04f323

View file

@ -57,6 +57,9 @@ class ProgressViewHelper extends AbstractViewHelper
//handling famous off by one //handling famous off by one
$activeStep -= $offset; $activeStep -= $offset;
//make sure our array index is numeric //make sure our array index is numeric
if (\is_iterable($links)) {
$links = \iterator_to_array($links);
}
$links = \array_values($links); $links = \array_values($links);
if (!$linkCount) { if (!$linkCount) {
$linkCount = \count($links); $linkCount = \count($links);