diff --git a/etemplate/inc/class.boetemplate.inc.php b/etemplate/inc/class.boetemplate.inc.php index de2b715498..3869b3a37c 100644 --- a/etemplate/inc/class.boetemplate.inc.php +++ b/etemplate/inc/class.boetemplate.inc.php @@ -581,7 +581,9 @@ } $pos = &$pos[$idx]; } - return isset($pos[$last_idx]); + // was return isset($pos[$last_idx]); + // array_key_exists also returns true for keys with value null, which fixes some problems with autorepeating rows + return is_array($pos) && array_key_exists($last_idx,$pos); } /**