diff --git a/etemplate/inc/class.boetemplate.inc.php b/etemplate/inc/class.boetemplate.inc.php index d5ef3f5ca0..f100e544a6 100644 --- a/etemplate/inc/class.boetemplate.inc.php +++ b/etemplate/inc/class.boetemplate.inc.php @@ -695,7 +695,11 @@ class boetemplate extends soetemplate } if (is_object($idx)) return false; // given an error in php5.2 - if (count($idxs = explode('[', $idx, 2)) > 1) + if (empty($idx)) + { + $idxs = array(); + } + elseif (count($idxs = explode('[', $idx, 2)) > 1) { $idxs = array_merge(array($idxs[0]), explode('][', substr($idxs[1],0,-1))); } diff --git a/etemplate/inc/class.etemplate_old.inc.php b/etemplate/inc/class.etemplate_old.inc.php index 28c1213120..380c7516f1 100644 --- a/etemplate/inc/class.etemplate_old.inc.php +++ b/etemplate/inc/class.etemplate_old.inc.php @@ -1074,15 +1074,7 @@ class etemplate_old extends boetemplate list($name) = explode('=',$name); } $form_name = self::form_name($cname,$name); - - if (!is_object($name) && (string)$name !== '' && is_array($content)) - { - $value = $this->get_array($content,$name); - } - else - { - $value =& $content; - } + $value = $this->get_array($content,$name); $options = ''; if ($readonly = $cell['readonly'] && $readonlys[$name] !== false || // allow to overwrite readonly settings of a cell @$readonlys[$name] && !is_array($readonlys[$name]) || $readonlys['__ALL__'] && (!is_string($name) || $readonlys[$name] !== false) ||