diff options
author | friendica <info@friendica.com> | 2012-03-13 15:41:13 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-03-13 15:41:13 -0700 |
commit | 427362c324e5acfad18c72108a59a9e6e5b58550 (patch) | |
tree | 7046e107ea723a917959606bfc4c41d2c8ccd2b7 /include/template_processor.php | |
parent | dc84da520d7bde3f2e160d2573a549829fd022cf (diff) | |
parent | acc4bbeb6ebc832da2a8b5a37b764a6a53dd1214 (diff) | |
download | volse-hubzilla-427362c324e5acfad18c72108a59a9e6e5b58550.tar.gz volse-hubzilla-427362c324e5acfad18c72108a59a9e6e5b58550.tar.bz2 volse-hubzilla-427362c324e5acfad18c72108a59a9e6e5b58550.zip |
Merge branch 'pull'
Diffstat (limited to 'include/template_processor.php')
-rwxr-xr-x | include/template_processor.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/template_processor.php b/include/template_processor.php index 8671587fc..7f7b0b55b 100755 --- a/include/template_processor.php +++ b/include/template_processor.php @@ -80,8 +80,13 @@ */ private function _replcb_for($args){ $m = array_map('trim', explode(" as ", $args[2])); - list($keyname, $varname) = explode("=>",$m[1]); - if (is_null($varname)) { $varname=$keyname; $keyname=""; } + $x = explode("=>",$m[1]); + if (count($x) == 1) { + $varname = $x[0]; + $keyname = ""; + } else { + list($keyname, $varname) = $x; + } if ($m[0]=="" || $varname=="" || is_null($varname)) die("template error: 'for ".$m[0]." as ".$varname."'") ; //$vals = $this->r[$m[0]]; $vals = $this->_get_var($m[0]); |