Skip to content

Commit ccf2912

Browse files
committed
Avoid warning if variable is null
1 parent d8d697c commit ccf2912

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpWord/Writer/ODText/Style/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function write()
4747
$xmlWriter->endElement(); // style:style
4848

4949
$cellWidths = $style->getColumnWidths();
50-
$countCellWidths = count($cellWidths);
50+
$countCellWidths = $cellWidths === null ? 0 : count($cellWidths);
5151

5252
for ($i = 0; $i < $countCellWidths; $i++) {
5353
$width = $cellWidths[$i];

0 commit comments

Comments
 (0)