From 191f6c4523aba0e06e341eadc8e1f75d545f476c Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Mon, 3 Jun 2024 17:41:40 +0400 Subject: [PATCH] modifs.mineures sans commentaires --- nur_src/v/bs3/vc/CTable.php | 5 +++-- nur_src/v/bs3/vc/CVerticalTable.php | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) 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;