From 3365bfdeca789ec3c1d48e9e2e79dcfed6116e6c Mon Sep 17 00:00:00 2001 From: sakarikl Date: Tue, 15 Jun 2021 17:45:05 +0300 Subject: [PATCH] fix color being filled to type 0 with php8 --- tcpdf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcpdf.php b/tcpdf.php index a2cff730..07a11ca9 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -4025,7 +4025,7 @@ public function setColor($type, $col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=fals } } $this->ColorFlag = ($this->FillColor != $this->TextColor); - if (($type != 'text') AND ($this->state == 2)) { + if (($type != 'text') AND ($this->state == 2) AND $type !== 0) { if (!$ret) { $this->_out($pdfcolor); }