Fixed method tagPaste

We need to remove quotes from names of blocks to get them from array.
This commit is contained in:
Vasily Naumkin 2017-06-26 12:47:19 +03:00 committed by GitHub
parent 8730343442
commit 6a7291fac6

View File

@ -1087,7 +1087,7 @@ class Compiler
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 ";