mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
템플릿 foreach 처리시 디버그 편의를 위해 원래의 엄격한 방식으로 되돌림
This commit is contained in:
parent
3d24c14f7f
commit
c728250fd7
2 changed files with 8 additions and 8 deletions
|
|
@ -466,7 +466,7 @@ class TemplateHandler
|
|||
{
|
||||
$expr_m[2] .= '=>' . trim($expr_m[3]);
|
||||
}
|
||||
$nodes[$idx - 1] .= sprintf('<?php if(!empty(%1$s))foreach((array)%1$s as %2$s){ ?>', $expr_m[1], $expr_m[2]);
|
||||
$nodes[$idx - 1] .= sprintf('<?php if(%1$s)foreach(%1$s as %2$s){ ?>', $expr_m[1], $expr_m[2]);
|
||||
}
|
||||
elseif($expr_m[4])
|
||||
{
|
||||
|
|
@ -865,7 +865,7 @@ class TemplateHandler
|
|||
elseif($mm[1] == 'foreach')
|
||||
{
|
||||
$var = preg_replace('/^\s*\(\s*(.+?) .*$/', '$1', $m[8]);
|
||||
$precheck = "if({$var}&&@count({$var}))";
|
||||
$precheck = "if({$var})";
|
||||
}
|
||||
return '<?php ' . self::_replaceVar($precheck . $m[7] . $m[8]) . '{ ?>' . $m[9];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue