File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Bridges/ApplicationLatte Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,9 @@ public function macroControl(MacroNode $node, PhpWriter $writer)
6969 $ name = $ writer ->formatWord ($ words [0 ]);
7070 $ method = isset ($ words [1 ]) ? ucfirst ($ words [1 ]) : '' ;
7171 $ method = Strings::match ($ method , '#^\w*\z# ' ) ? "render $ method " : "{ \"render $ method \"} " ;
72- $ param = $ writer ->formatArray ();
73- if (! Strings::contains ($ node ->args , '=> ' )) {
74- $ param = substr ( $ param, $ param [ 0 ] === ' [ ' ? 1 : 6 , - 1 ); // removes array() or []
72+ $ param = $ writer ->formatArgs ();
73+ if (Strings::contains ($ node ->args , '=> ' )) {
74+ $ param = " [ $ param] " ;
7575 }
7676 return ($ name [0 ] === '$ ' ? "if (is_object( $ name)) \$_l->tmp = $ name; else " : '' )
7777 . '$_l->tmp = $_control->getComponent( ' . $ name . '); '
You can’t perform that action at this time.
0 commit comments