Skip to content

Commit

Permalink
Fixed method tagPaste
Browse files Browse the repository at this point in the history
We need to remove quotes from names of blocks to get them from array.
  • Loading branch information
bezumkin authored Jun 26, 2017
1 parent 8730343 commit 6a7291f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fenom/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ public static function tagUnset(Tokenizer $tokens, Tag $tag)

public static function tagPaste(Tokenizer $tokens, Tag $tag)
{
$name = $tokens->get(T_CONSTANT_ENCAPSED_STRING);
$name = str_replace(array('\'', '"'), '', $tokens->get(T_CONSTANT_ENCAPSED_STRING));
$tokens->next();
if(isset($tag->tpl->blocks[$name])) {
return "?>".substr($tag->tpl->blocks[$name]["block"], 1, -1)."<?php ";
Expand Down

0 comments on commit 6a7291f

Please sign in to comment.