Skip to content

Commit

Permalink
Merge pull request #1988 from Ciki/patch-1
Browse files Browse the repository at this point in the history
Fix deprecated warning for non-hexadecimal number
  • Loading branch information
troosan authored Feb 5, 2021
2 parents ca1272b + 13384f6 commit 3c66ce9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/PhpWord/Writer/HTML/Element/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function write()
for ($j = 0; $j < $rowCellCount; $j++) {
$cellStyle = $rowCells[$j]->getStyle();
$cellBgColor = $cellStyle->getBgColor();
$cellBgColor === 'auto' && $cellBgColor = null; // auto cannot be parsed to hexadecimal number
$cellFgColor = null;
if ($cellBgColor) {
$red = hexdec(substr($cellBgColor, 0, 2));
Expand Down

0 comments on commit 3c66ce9

Please sign in to comment.