silenced warning: can not use scalar value as array in line 672

This commit is contained in:
Ralf Becker 2013-02-08 08:54:20 +00:00
parent 2809b52d4d
commit 194dd78deb

View File

@ -179,7 +179,7 @@ class etemplate_widget
{ {
$this->attrs = array_merge($this->attrs,self::$request->modifications[$this->id]); $this->attrs = array_merge($this->attrs,self::$request->modifications[$this->id]);
} }
return $template; return $template;
} }
@ -664,8 +664,9 @@ class etemplate_widget
$pos = &$arr; $pos = &$arr;
foreach($idxs as $idx) foreach($idxs as $idx)
{ {
if (!is_array($pos) && !$reference_into) if (!is_array($pos) && (!$reference_into || $reference_into && isset($pos)))
{ {
//if ($reference_into) error_log(__METHOD__."(".(strlen($s=array2string($arr))>512?substr($s,0,512).'...':$s).", '$idx', ".array2string($reference_into).", ".array2string($skip_empty).") ".function_backtrace());
return False; return False;
} }
if($skip_empty && (!is_array($pos) || !isset($pos[$idx]))) return false; if($skip_empty && (!is_array($pos) || !isset($pos[$idx]))) return false;