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:
parent
b8bb95fc37
commit
aac3d196ee
|
|
@ -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'))
|
||||
|
|
|
|||
Loading…
Reference in New Issue