modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2024-06-03 17:41:40 +04:00
parent 7aa2ad4a73
commit 191f6c4523
2 changed files with 5 additions and 3 deletions

View File

@ -351,7 +351,8 @@ class CTable extends ComponentPrintable implements IParametrable {
protected function ensureArray($row): array { protected function ensureArray($row): array {
if (!is_array($row)) { 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); elseif ($row instanceof Iterator) $row = iterator_to_array($row);
else throw ValueException::unexpected_type("array", $row); else throw ValueException::unexpected_type("array", $row);
} }
@ -450,7 +451,7 @@ class CTable extends ComponentPrintable implements IParametrable {
$this->rowIndex = 0; $this->rowIndex = 0;
$haveRows = false; $haveRows = false;
while ($this->_validRow()) { while ($this->_validRow()) {
$this->rawRow = $this->_currentRow($this->rowKey);; $this->rawRow = $this->_currentRow($this->rowKey);
try { try {
$this->origRow = $this->nextRow(); $this->origRow = $this->nextRow();
if ($this->origRow === null) continue; if ($this->origRow === null) continue;

View File

@ -34,8 +34,9 @@ class CVerticalTable extends CTable {
$this->rowIndex = 0; $this->rowIndex = 0;
$haveRows = false; $haveRows = false;
while ($this->_validRow()) { while ($this->_validRow()) {
$this->origRow = $this->nextRow(); $this->rawRow = $this->_currentRow($this->rowKey);
try { try {
$this->origRow = $this->nextRow();
if ($this->origRow === null) continue; if ($this->origRow === null) continue;
$skipRow = false; $skipRow = false;