- Fixed last rebase
This commit is contained in:
parent
ef95576d74
commit
0c0ba39072
@ -14,27 +14,8 @@ abstract class AbstractLoop implements ControlStructure {
|
|||||||
|
|
||||||
$count = count($stack);
|
$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 ) {
|
if ( $count > 0 ) {
|
||||||
$name .= "[" . end($stack)['uid'] . "]";
|
$name .= "[" . end($stack)['uid'] . "]";
|
||||||
>>>>>>> 579a917 (- Added a loop index in AbstractLoop control struct.)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$context->iterationStack[] = [
|
$context->iterationStack[] = [
|
||||||
@ -62,3 +43,4 @@ abstract class AbstractLoop implements ControlStructure {
|
|||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user