diff options
author | Tobias Hößl <tobias@hoessl.eu> | 2012-02-28 21:56:42 +0000 |
---|---|---|
committer | Tobias Hößl <tobias@hoessl.eu> | 2012-02-28 21:56:42 +0000 |
commit | 5bb8ed4b8b5310acc8556ef2fba7b3958284b2a6 (patch) | |
tree | 6f15b4cff6c76ee7f93b4e50f28142b3eaee5007 /include/template_processor.php | |
parent | 3d249f0eddb058f74b33d8205202b17ab7555aa6 (diff) | |
download | volse-hubzilla-5bb8ed4b8b5310acc8556ef2fba7b3958284b2a6.tar.gz volse-hubzilla-5bb8ed4b8b5310acc8556ef2fba7b3958284b2a6.tar.bz2 volse-hubzilla-5bb8ed4b8b5310acc8556ef2fba7b3958284b2a6.zip |
Mostly some checks in order to avoid Notices; 1 real bugfix in /mod/network.php
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 28c3f07dd..7a4cba64e 100755 --- a/include/template_processor.php +++ b/include/template_processor.php @@ -92,8 +92,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]); |