Fix incorrect use of curly braces in legacy classes

This commit is contained in:
Kijin Sung 2020-05-19 20:52:44 +09:00
parent 2cbfd4500c
commit 14ad62e869
4 changed files with 39 additions and 39 deletions

View file

@ -484,7 +484,7 @@ class TemplateHandler
// find closing tag
$close_php = '<?php ' . str_repeat('}', $closing) . ' ?>';
// self closing tag
if($node{1} == '!' || substr($node, -2, 1) == '/' || isset($self_closing[$tag]))
if($node[1] == '!' || substr($node, -2, 1) == '/' || isset($self_closing[$tag]))
{
$nodes[$idx + 1] = $close_php . $nodes[$idx + 1];
}
@ -545,7 +545,7 @@ class TemplateHandler
return $m[0];
}
if($m[1]{0} == '@')
if($m[1][0] == '@')
{
$m[1] = self::_replaceVar(substr($m[1], 1));
return "<?php {$m[1]} ?>";
@ -866,7 +866,7 @@ class TemplateHandler
}
if($mm[1])
{
if($mm[1]{0} == 'e')
if($mm[1][0] == 'e')
{
return '<?php } ?>' . $m[9];
}
@ -931,7 +931,7 @@ class TemplateHandler
$_path = $path;
$fileDir = strtr(realpath($this->path), '\\', '/');
if($path{0} != '/')
if($path[0] != '/')
{
$path = strtr(realpath($fileDir . '/' . $path), '\\', '/');
}