diff --git a/nur_src/v/bs3/vc/CTable.php b/nur_src/v/bs3/vc/CTable.php index 2fa6f90..a902b10 100644 --- a/nur_src/v/bs3/vc/CTable.php +++ b/nur_src/v/bs3/vc/CTable.php @@ -351,7 +351,8 @@ class CTable extends ComponentPrintable implements IParametrable { protected function ensureArray($row): array { if (!is_array($row)) { - if ($row instanceof BaseArray) $row = $row->array(); + if ($row === null) $row = []; + elseif ($row instanceof BaseArray) $row = $row->array(); elseif ($row instanceof Iterator) $row = iterator_to_array($row); else throw ValueException::unexpected_type("array", $row); } @@ -450,7 +451,7 @@ class CTable extends ComponentPrintable implements IParametrable { $this->rowIndex = 0; $haveRows = false; while ($this->_validRow()) { - $this->rawRow = $this->_currentRow($this->rowKey);; + $this->rawRow = $this->_currentRow($this->rowKey); try { $this->origRow = $this->nextRow(); if ($this->origRow === null) continue; diff --git a/nur_src/v/bs3/vc/CVerticalTable.php b/nur_src/v/bs3/vc/CVerticalTable.php index 2bbdb93..bd5dd9c 100644 --- a/nur_src/v/bs3/vc/CVerticalTable.php +++ b/nur_src/v/bs3/vc/CVerticalTable.php @@ -34,8 +34,9 @@ class CVerticalTable extends CTable { $this->rowIndex = 0; $haveRows = false; while ($this->_validRow()) { - $this->origRow = $this->nextRow(); + $this->rawRow = $this->_currentRow($this->rowKey); try { + $this->origRow = $this->nextRow(); if ($this->origRow === null) continue; $skipRow = false;