From e0e008fb8d894c7fe56fbb88fa96224c0796ea75 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 17 Mar 2012 02:26:52 -0700 Subject: template processor broken with foreach k=>v and k is integer 0 --- include/template_processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/template_processor.php') diff --git a/include/template_processor.php b/include/template_processor.php index 7f7b0b55b..93bf391c5 100755 --- a/include/template_processor.php +++ b/include/template_processor.php @@ -96,7 +96,7 @@ $this->_push_stack(); $r = $this->r; $r[$varname] = $v; - if ($keyname!='') $r[$keyname] = $k; + if ($keyname!='') $r[$keyname] = (($k === 0) ? '0' : $k); $ret .= $this->replace($args[3], $r); $this->_pop_stack(); } -- cgit v1.2.3