- Added a new {% block ... %} token

- Added a new {% php ... %} token
- Fixed a bug with an OR if foreach is empty
This commit is contained in:
Dave Mc Nicoll committed 2020-03-30 12:13:02 -04:00
1 parent 0e201b77f2
commit 404d1f4359
9 files changed
+143 -22

No files matched your search

+7 -1
View File
@@ -13,7 +13,13 @@ class OrToken implements ControlStructure {
$key = count( $context->iterationStack ) - 1;
$context->iterationStack[$key]['or'] = true;
return "<?php {$context->iterationStack[$key]['token']}; if( false === ({$context->iterationStack[$key]['uid']} ?? false) ): ?>";
$name = $context->iterationStack[$key]['uid'];
#if ($key !== 0) {
#}
return "<?php {$context->iterationStack[$key]['token']}; if( false === ($name ?? false) ): ?>";
}
}