From 0aa565b4393d7b619ae4a0920f639826b50c57f2 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Fri, 27 Mar 2015 11:48:07 +0100 Subject: [PATCH] CoreMacros: {dump} updated for 2.3 --- src/Latte/Macros/CoreMacros.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Latte/Macros/CoreMacros.php b/src/Latte/Macros/CoreMacros.php index 314c9e54e..57d38ebd9 100644 --- a/src/Latte/Macros/CoreMacros.php +++ b/src/Latte/Macros/CoreMacros.php @@ -306,8 +306,10 @@ public function macroAttr(MacroNode $node, PhpWriter $writer) public function macroDump(MacroNode $node, PhpWriter $writer) { $args = $writer->formatArgs(); - return 'Tracy\Debugger::barDump(' . ($node->args ? $writer->write("array(%var => $args)", $args) : 'get_defined_vars()') - . ', "Template " . str_replace(dirname(dirname($template->getName())), "\xE2\x80\xA6", $template->getName()))'; + return $writer->write( + 'Tracy\Debugger::barDump(' . ($args ? "($args)" : 'get_defined_vars()'). ', %var)', + $args ?: 'variables' + ); }