Fixed error when using {% flash type %}

While {% flash %} works fine for displaying all flash messages, if
a user wants to show only a certain type with {% flash success %}
(for example), it errors with "Undefined variable: message".
This commit is contained in:
Dave Shoreman 2015-05-29 21:23:18 +01:00
parent b8bb95fc37
commit aac3d196ee
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ class FlashNode extends Twig_Node
->write(';')
->write('foreach (Flash::')
->raw($attrib)
->write('() as $messages) {'.PHP_EOL)
->write('() as $message) {'.PHP_EOL)
->indent()
->write('$context["message"] = $message;')
->subcompile($this->getNode('body'))