mirror of
https://github.com/Mibew/handlebars.php.git
synced 2024-11-15 08:44:12 +03:00
Merge branch 'patch-4' of github.com:ulriklystbaek/handlebars.php
This commit is contained in:
commit
cc5bb9bf87
@ -52,6 +52,8 @@ class UnlessHelper implements Helper
|
||||
{
|
||||
$tmp = $context->get($args);
|
||||
|
||||
$context->push($context->last());
|
||||
|
||||
if (!$tmp) {
|
||||
$template->setStopToken('else');
|
||||
$buffer = $template->render($context);
|
||||
@ -62,6 +64,8 @@ class UnlessHelper implements Helper
|
||||
$template->setStopToken(false);
|
||||
$buffer = $template->render($context);
|
||||
}
|
||||
|
||||
$context->pop();
|
||||
|
||||
return $buffer;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user