From f7b000d23cc401825be2967edef619a7da273da1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 6 Sep 2023 09:51:45 +0200 Subject: [PATCH 1/5] Fix SPDX license ID (#591) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f06c7337..b5a64873 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ ], "homepage": "http://www.tcpdf.org/", "version": "6.6.2", - "license": "LGPL-3.0-only", + "license": "LGPL-3.0-or-later", "authors": [ { "name": "Nicola Asuni", From 70b63fa124f818ddc1f2203bad63b8cc9e2c145f Mon Sep 17 00:00:00 2001 From: Robert Kosmac Date: Wed, 6 Sep 2023 15:55:27 +0800 Subject: [PATCH 2/5] Applied fix found by BrainforgeUK in Issue #564 (#620) Tested and confirmed working in PHP 7.4 and PHP 8.2 --- tcpdf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcpdf.php b/tcpdf.php index 667b004f..688a985b 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -2461,7 +2461,7 @@ public function setLastH($h) { */ public function getCellHeight($fontsize, $padding=TRUE) { $height = ($fontsize * $this->cell_height_ratio); - if ($padding) { + if ($padding && !empty($this->cell_padding)) { $height += ($this->cell_padding['T'] + $this->cell_padding['B']); } return round($height, 6); From fc6faf6935c84469ebc0aa285333e4ee5523e384 Mon Sep 17 00:00:00 2001 From: Ruben Barkow-Kuder Date: Wed, 6 Sep 2023 09:56:29 +0200 Subject: [PATCH 3/5] README: tone down the warning about tc-lib-pdf (#589) * README: tone down the warning about tc-lib-pdf Signed-off-by: Ruben Barkow-Kuder * Update README.md Co-authored-by: William Desportes --------- Signed-off-by: Ruben Barkow-Kuder Co-authored-by: William Desportes --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cf843227..567ad5bd 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,8 @@ * **source** https://github.com/tecnickcom/TCPDF -## IMPORTANT -A new version of this library is under development at https://github.com/tecnickcom/tc-lib-pdf and as a consequence this version will not receive any additional development or support. -This version should be considered obsolete, new projects should use the new version as soon it will become stable. +## NOTE +A new version of this library is under development at https://github.com/tecnickcom/tc-lib-pdf and as a consequence this library is in support only mode. From 7734617956dd441dca573302f63d3d691c0b1d04 Mon Sep 17 00:00:00 2001 From: Robert Johnson Nallori Date: Wed, 6 Sep 2023 13:27:19 +0530 Subject: [PATCH 4/5] Fix of Deprecation warning with php 8.1 #614 (#615) * Fix of Deprecation warning with php 8.1 #614 * Update include/barcodes/qrcode.php Co-authored-by: William Desportes --------- Co-authored-by: Robert Johnson Nallori Co-authored-by: johnson361 Co-authored-by: William Desportes --- include/barcodes/qrcode.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/barcodes/qrcode.php b/include/barcodes/qrcode.php index 322cace3..1a64a4cb 100644 --- a/include/barcodes/qrcode.php +++ b/include/barcodes/qrcode.php @@ -888,6 +888,7 @@ protected function getCode() { if ($col >= $this->rsblocks[0]['dataLength']) { $row += $this->b1; } + $row = (int) $row; $ret = $this->rsblocks[$row]['data'][$col]; } elseif ($this->count < $this->dataLength + $this->eccLength) { $row = ($this->count - $this->dataLength) % $this->blocks; From 35e41474e574187b372d4bbf157bb0a9d63a76c1 Mon Sep 17 00:00:00 2001 From: Sagehen Studio Date: Wed, 6 Sep 2023 01:01:36 -0700 Subject: [PATCH 5/5] Fixes for PHP 8.2 in tcpdf_fonts.php - fixes #632 (#633) * Update tcpdf_fonts.php Fixes "use of "self" in callables is deprecated" warning is arising from tcpdf_fonts.php when using PHP >= 8.2 * Update tcpdf_fonts.php for PHP 5.3-8.2 compatibility PHP 8.2 "use of "self" in callables is deprecated" yet some ways of fixing this breaks for PHP 5.3. This approach works, tested PHP 5.3.29 - 8.2.0 * Update tcpdf_fonts.php Spaces added back in before arguments * Update tcpdf_fonts.php using get_called_class() Maneuvers compatibility of callables inside array_map() between PHP 5.3 and 8.2 - tested. --------- Co-authored-by: Nicola Asuni --- include/tcpdf_fonts.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/tcpdf_fonts.php b/include/tcpdf_fonts.php index 30053d3e..a04d5144 100644 --- a/include/tcpdf_fonts.php +++ b/include/tcpdf_fonts.php @@ -1780,9 +1780,9 @@ public static function arrUTF8ToUTF16BE($unicode, $setbom=false) { */ public static function UTF8ArrayToUniArray($ta, $isunicode=true) { if ($isunicode) { - return array_map(array('TCPDF_FONTS', 'unichrUnicode'), $ta); + return array_map(get_called_class().'::unichrUnicode', $ta); } - return array_map(array('TCPDF_FONTS', 'unichrASCII'), $ta); + return array_map(get_called_class().'::unichrASCII', $ta); } /** @@ -2002,7 +2002,7 @@ public static function UTF8StringToArray($str, $isunicode, &$currentfont) { if ($isunicode) { // requires PCRE unicode support turned on $chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY); - $carr = array_map(array('TCPDF_FONTS', 'uniord'), $chars); + $carr = array_map(get_called_class().'::uniord', $chars); } else { $chars = str_split($str); $carr = array_map('ord', $chars);