diff --git a/tcpdf.php b/tcpdf.php index 24106ea..a929e08 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -18917,13 +18917,30 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $prevlinewidth = $this->GetLineWidth(); $this->SetLineWidth($hrHeight); - $lineStyle = array( - 'color' => $tag['fgcolor'], - 'cap' => $tag['style']['cap'], - 'join' => $tag['style']['join'], - 'dash' => $tag['style']['dash'], - 'phase' => $tag['style']['phase'], - ); + $lineStyle = array(); + if (isset($tag['fgcolor'])) { + $lineStyle['color'] = $tag['fgcolor']; + } + + if (isset($tag['fgcolor'])) { + $lineStyle['color'] = $tag['fgcolor']; + } + + if (isset($tag['style']['cap'])) { + $lineStyle['cap'] = $tag['style']['cap']; + } + + if (isset($tag['style']['join'])) { + $lineStyle['join'] = $tag['style']['join']; + } + + if (isset($tag['style']['dash'])) { + $lineStyle['dash'] = $tag['style']['dash']; + } + + if (isset($tag['style']['phase'])) { + $lineStyle['phase'] = $tag['style']['phase']; + } $lineStyle = array_filter($lineStyle);