mirror of
https://github.com/tecnickcom/TCPDF.git
synced 2025-03-21 14:39:40 +01:00
fix warnings for undefined tags for $lineStyle (#378)
Under PHP8, this generated warnings. If a tag is not set, it would throw a warning. Because the downstream usage of the $lineStyle can handle undefined entries, it's safe to leave them unset here. Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
This commit is contained in:
parent
7f650ee925
commit
7ecf638b13
31
tcpdf.php
31
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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user