diff --git a/src/PhpWord/Writer/ODText/Style/Table.php b/src/PhpWord/Writer/ODText/Style/Table.php index 5ddee25a..c64dee4f 100644 --- a/src/PhpWord/Writer/ODText/Style/Table.php +++ b/src/PhpWord/Writer/ODText/Style/Table.php @@ -47,7 +47,7 @@ class Table extends AbstractStyle $xmlWriter->endElement(); // style:style $cellWidths = $style->getColumnWidths(); - $countCellWidths = count($cellWidths); + $countCellWidths = $cellWidths === null ? 0 : count($cellWidths); for ($i = 0; $i < $countCellWidths; $i++) { $width = $cellWidths[$i];