From 17263ca14deca1e172ecd43c820d30628f536100 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Tue, 11 Aug 2020 19:02:45 +0200 Subject: [PATCH] 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(). --- src/Symfony/Component/Console/Helper/Table.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index 0e31e60d5c..82aeb3fc8e 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -674,16 +674,12 @@ class Table { $newRow = []; - $newColumn = null; foreach ($row as $column => $cell) { - if (null === $newColumn) { - $newColumn = $column; - } - $newRow[$newColumn++] = $cell; + $newRow[] = $cell; if ($cell instanceof TableCell && $cell->getColspan() > 1) { foreach (range($column + 1, $column + $cell->getColspan() - 1) as $position) { // insert empty value at column position - $newRow[$newColumn++] = ''; + $newRow[] = ''; } } }