Skip to content

Commit de2828b

Browse files
committed
Quick Fix
1 parent 6769df2 commit de2828b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpWord/Writer/RTF/Element/Text.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function write()
5151
$content .= '\strike ';
5252
}
5353
}
54-
if ($this->fontStyle !== null) {
54+
if ($this->fontStyle !== null && method_exists($this->fontStyle, 'getFgColor')) {
5555
$fgColor = $this->fontStyle->getFgColor();
5656
if ($fgColor !== null) {
5757
$fgColorIndex = array_search($fgColor, $this->parentWriter->getColorTable());

0 commit comments

Comments
 (0)