File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/PhpWord/Writer/ODText/Style Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -88,8 +88,8 @@ private function writeStyle(FontStyle $style): void
8888 $ xmlWriter ->writeAttributeIf (is_numeric ($ size ), 'style:font-size-complex ' , $ size . 'pt ' );
8989
9090 // Color
91- $ color = $ style ->getColor ();
92- $ xmlWriter ->writeAttributeIf ($ color != '' , 'fo:color ' , '# ' . \PhpOffice \PhpWord \Shared \Converter::stringToRgb ($ color ));
91+ $ color = ( string ) $ style ->getColor ();
92+ $ xmlWriter ->writeAttributeIf ($ color !== '' , 'fo:color ' , '# ' . \PhpOffice \PhpWord \Shared \Converter::stringToRgb ($ color ));
9393
9494 // Bold & italic
9595 $ xmlWriter ->writeAttributeIf ($ style ->isBold (), 'fo:font-weight ' , 'bold ' );
@@ -133,8 +133,8 @@ private function writeStyle(FontStyle $style): void
133133 }
134134
135135 // Foreground-Color (which is really background color)
136- $ fgColor = $ style ->getFgColor ();
137- $ xmlWriter ->writeAttributeIf ($ fgColor != '' , 'fo:background-color ' , '# ' . \PhpOffice \PhpWord \Shared \Converter::stringToRgb ($ fgColor ));
136+ $ fgColor = ( string ) $ style ->getFgColor ();
137+ $ xmlWriter ->writeAttributeIf ($ fgColor !== '' , 'fo:background-color ' , '# ' . \PhpOffice \PhpWord \Shared \Converter::stringToRgb ($ fgColor ));
138138
139139 $ xmlWriter ->endElement (); // style:text-properties
140140 $ xmlWriter ->endElement (); // style:style
You can’t perform that action at this time.
0 commit comments