From 0085004001d49ca411155ae27a0febfed5fc7acc Mon Sep 17 00:00:00 2001 From: Robert Johnson Nallori Date: Mon, 19 Feb 2024 22:56:43 +0530 Subject: [PATCH 1/2] Fix PHP8.2 deprecated warnings in getHtmlDomArray() in tcpdf.php Signed-off-by: Robert Johnson Nallori --- tcpdf.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tcpdf.php b/tcpdf.php index cd020512..17c240bb 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -16389,6 +16389,8 @@ public function getHTMLFontUnits($val, $refsize=12, $parent_size=12, $defaultuni * @since 3.2.000 (2008-06-20) */ protected function getHtmlDomArray($html) { + if(empty($html)) + return []; // array of CSS styles ( selector => properties). $css = array(); // get CSS array defined at previous call From 625787e52bdbb18645c821f641b1d689a64ce57b Mon Sep 17 00:00:00 2001 From: Robert Johnson Nallori Date: Tue, 20 Feb 2024 08:40:43 +0530 Subject: [PATCH 2/2] Update tcpdf.php support old php versions Co-authored-by: William Desportes --- tcpdf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcpdf.php b/tcpdf.php index 17c240bb..f9a48cb8 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -16390,7 +16390,7 @@ public function getHTMLFontUnits($val, $refsize=12, $parent_size=12, $defaultuni */ protected function getHtmlDomArray($html) { if(empty($html)) - return []; + return array(); // array of CSS styles ( selector => properties). $css = array(); // get CSS array defined at previous call