File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/PhpWord/Writer/HTML/Element Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -59,12 +59,10 @@ public function write()
5959 $ cellFgColor = null ;
6060 if ($ cellBgColor && $ cellBgColor !== 'auto ' ) {
6161 $ cellBgColor = \PhpOffice \PhpWord \Shared \Converter::stringToRgb ($ cellBgColor );
62- if ($ cellBgColor !== false ) {
63- $ red = hexdec (substr ($ cellBgColor , 0 , 2 ));
64- $ green = hexdec (substr ($ cellBgColor , 2 , 2 ));
65- $ blue = hexdec (substr ($ cellBgColor , 4 , 2 ));
66- $ cellFgColor = (($ red * 0.299 + $ green * 0.587 + $ blue * 0.114 ) > 186 ) ? null : 'ffffff ' ;
67- }
62+ $ red = hexdec (substr ($ cellBgColor , 0 , 2 ));
63+ $ green = hexdec (substr ($ cellBgColor , 2 , 2 ));
64+ $ blue = hexdec (substr ($ cellBgColor , 4 , 2 ));
65+ $ cellFgColor = (($ red * 0.299 + $ green * 0.587 + $ blue * 0.114 ) > 186 ) ? null : 'ffffff ' ;
6866 }
6967 $ cellColSpan = $ cellStyle ->getGridSpan ();
7068 $ cellRowSpan = 1 ;
You can’t perform that action at this time.
0 commit comments