mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-29 15:22:15 +09:00
object 변수일 경우 템플릿 foreach 문이 작동하지 않는 문제 수정
#1023 문제 수정 레이아웃 확장변수 (extra_var)가 object 라서 발생한 warning 수정 (왜 object로 했는 지 모르겠지만, array가 더 맞는 듯함) Warning: count(): Parameter must be an array or an object that implements Countable in php 7.2
This commit is contained in:
parent
c4b12c301c
commit
3d24c14f7f
3 changed files with 7 additions and 7 deletions
|
|
@ -466,7 +466,7 @@ class TemplateHandler
|
|||
{
|
||||
$expr_m[2] .= '=>' . trim($expr_m[3]);
|
||||
}
|
||||
$nodes[$idx - 1] .= sprintf('<?php if(is_array(%1$s))foreach(%1$s as %2$s){ ?>', $expr_m[1], $expr_m[2]);
|
||||
$nodes[$idx - 1] .= sprintf('<?php if(!empty(%1$s))foreach((array)%1$s as %2$s){ ?>', $expr_m[1], $expr_m[2]);
|
||||
}
|
||||
elseif($expr_m[4])
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue