Revert changes to Table->fillCells()

These changes were introduced in https://github.com/symfony/symfony/pull/37731
but no longer contributed to the actual fix, which was to perform a
->copyRow().
This commit is contained in:
Jelle Raaijmakers 2020-08-11 19:02:45 +02:00
parent 0f92b9a584
commit 17263ca14d

View File

@ -674,16 +674,12 @@ class Table
{ {
$newRow = []; $newRow = [];
$newColumn = null;
foreach ($row as $column => $cell) { foreach ($row as $column => $cell) {
if (null === $newColumn) { $newRow[] = $cell;
$newColumn = $column;
}
$newRow[$newColumn++] = $cell;
if ($cell instanceof TableCell && $cell->getColspan() > 1) { if ($cell instanceof TableCell && $cell->getColspan() > 1) {
foreach (range($column + 1, $column + $cell->getColspan() - 1) as $position) { foreach (range($column + 1, $column + $cell->getColspan() - 1) as $position) {
// insert empty value at column position // insert empty value at column position
$newRow[$newColumn++] = ''; $newRow[] = '';
} }
} }
} }