- Fixed last rebase

This commit is contained in:
Dave Mc Nicoll 2025-10-15 14:59:31 +00:00
parent ef95576d74
commit 0c0ba39072

View File

@ -14,27 +14,8 @@ abstract class AbstractLoop implements ControlStructure {
$count = count($stack);
<<<<<<< HEAD
return "<?php $token ($arguments): \$__loop_index = $name = ( $name ?? 0 ) + 1; ?>";
case "endwhile":
case "endforeach":
$last = end($context->iterationStack);
if ( $last['or'] === false ) {
$output = "<?php $token; ?>";
}
else {
$output = "<?php endif; if ( isset({$last['uid']}) ) unset({$last['uid']}); ?>";
}
array_pop($context->iterationStack);
return $output;
=======
if ( $count > 0 ) {
$name .= "[" . end($stack)['uid'] . "]";
>>>>>>> 579a917 (- Added a loop index in AbstractLoop control struct.)
}
$context->iterationStack[] = [
@ -62,3 +43,4 @@ abstract class AbstractLoop implements ControlStructure {
return $output;
}
}