N°3075 - Fix syntax error with PHP 5.6 and TCPDF 6.3.4

This commit is contained in:
acognet
2020-06-05 17:02:50 +02:00
parent 0b84e809f6
commit 1b7473365d
12 changed files with 37 additions and 35 deletions

View File

@@ -6,7 +6,7 @@
* **category** Library
* **author** Nicola Asuni <info@tecnick.com>
* **copyright** 2002-2019 Nicola Asuni - Tecnick.com LTD
* **copyright** 2002-2020 Nicola Asuni - Tecnick.com LTD
* **license** http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
* **link** http://www.tcpdf.org
* **source** https://github.com/tecnickcom/TCPDF

View File

@@ -1 +1 @@
6.3.4
6.3.5

View File

@@ -6,13 +6,8 @@
"homepage": "https://github.com/combodo-itop-libs/TCPDF",
"type": "library",
"description": "TCPDF fork adding requirements for iTop: Specific fonts.",
"license": "LGPL-3.0-only",
"license": "LGPL-3.0",
"authors": [
{
"name": "Nicola Asuni",
"email": "info@tecnick.com",
"role": "lead"
},
{
"name": "Combodo",
"email": "contact@combodo.com"

View File

@@ -878,7 +878,7 @@ class PDF417 {
$txtarr = array(); // array of characters and sub-mode switching characters
$codelen = strlen($code);
for ($i = 0; $i < $codelen; ++$i) {
$chval = ord($code{$i});
$chval = ord($code[$i]);
if (($k = array_search($chval, $this->textsubmodes[$submode])) !== false) {
// we are on the same sub-mode
$txtarr[] = $k;
@@ -888,7 +888,7 @@ class PDF417 {
// search new sub-mode
if (($s != $submode) AND (($k = array_search($chval, $this->textsubmodes[$s])) !== false)) {
// $s is the new submode
if (((($i + 1) == $codelen) OR ((($i + 1) < $codelen) AND (array_search(ord($code{($i + 1)}), $this->textsubmodes[$submode]) !== false))) AND (($s == 3) OR (($s == 0) AND ($submode == 1)))) {
if (((($i + 1) == $codelen) OR ((($i + 1) < $codelen) AND (array_search(ord($code[($i + 1)]), $this->textsubmodes[$submode]) !== false))) AND (($s == 3) OR (($s == 0) AND ($submode == 1)))) {
// shift (temporary change only for this char)
if ($s == 3) {
// shift to puntuaction
@@ -952,7 +952,7 @@ class PDF417 {
$cw = array_merge($cw, $cw6);
} else {
for ($i = 0; $i < $sublen; ++$i) {
$cw[] = ord($code{$i});
$cw[] = ord($code[$i]);
}
}
$code = $rest;

View File

@@ -55,7 +55,7 @@ class TCPDF_STATIC {
* Current TCPDF version.
* @private static
*/
private static $tcpdf_version = '6.3.4';
private static $tcpdf_version = '6.3.5';
/**
* String alias for total number of pages.
@@ -1859,7 +1859,7 @@ class TCPDF_STATIC {
public static function encodeUrlQuery($url) {
$urlData = parse_url($url);
if (isset($urlData['query']) && $urlData['query']) {
$urlQueryData = [];
$urlQueryData = array();
parse_str(urldecode($urlData['query']), $urlQueryData);
$updatedUrl = $urlData['scheme'] . '://' . $urlData['host'] . $urlData['path'] . '?' . http_build_query($urlQueryData);
} else {

View File

@@ -7178,7 +7178,7 @@ class TCPDF {
} else {
$ximg = $x;
}
if ($ismask OR $hidden) {
// image is not displayed
return $info['i'];
@@ -12384,7 +12384,8 @@ class TCPDF {
$x = $this->w;
}
$fixed = false;
if ((string)$page && (((string)$page)[0] == '*')) {
$pageAsString = (string) $page;
if ($pageAsString && $pageAsString[0] == '*') {
$page = intval(substr($page, 1));
// this page number will not be changed when moving/add/deleting pages
$fixed = true;

View File

@@ -197,6 +197,7 @@ return array(
'DataTableSettings' => $baseDir . '/application/datatable.class.inc.php',
'Datamatrix' => $vendorDir . '/combodo/tcpdf/include/barcodes/datamatrix.php',
'DateTimeFormat' => $baseDir . '/core/datetimeformat.class.inc.php',
'DeadLockLog' => $baseDir . '/core/log.class.inc.php',
'DefaultLogFileNameBuilder' => $baseDir . '/core/log.class.inc.php',
'DefaultMetricComputer' => $baseDir . '/core/computing.inc.php',
'DefaultWorkingTimeComputer' => $baseDir . '/core/computing.inc.php',

View File

@@ -13,6 +13,9 @@ class ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {

View File

@@ -427,6 +427,7 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'DataTableSettings' => __DIR__ . '/../..' . '/application/datatable.class.inc.php',
'Datamatrix' => __DIR__ . '/..' . '/combodo/tcpdf/include/barcodes/datamatrix.php',
'DateTimeFormat' => __DIR__ . '/../..' . '/core/datetimeformat.class.inc.php',
'DeadLockLog' => __DIR__ . '/../..' . '/core/log.class.inc.php',
'DefaultLogFileNameBuilder' => __DIR__ . '/../..' . '/core/log.class.inc.php',
'DefaultMetricComputer' => __DIR__ . '/../..' . '/core/computing.inc.php',
'DefaultWorkingTimeComputer' => __DIR__ . '/../..' . '/core/computing.inc.php',

View File

@@ -1,17 +1,17 @@
[
{
"name": "combodo/tcpdf",
"version": "6.3.4",
"version_normalized": "6.3.4.0",
"version": "6.3.5",
"version_normalized": "6.3.5.0",
"source": {
"type": "git",
"url": "https://github.com/combodo-itop-libs/TCPDF.git",
"reference": "fe1c625d33e8f7d872d6fb69fb0255fd0e5cee2d"
"reference": "abbfedb8ca59843dec11c97ca3f308742265c3fc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/combodo-itop-libs/TCPDF/zipball/fe1c625d33e8f7d872d6fb69fb0255fd0e5cee2d",
"reference": "fe1c625d33e8f7d872d6fb69fb0255fd0e5cee2d",
"url": "https://api.github.com/repos/combodo-itop-libs/TCPDF/zipball/abbfedb8ca59843dec11c97ca3f308742265c3fc",
"reference": "abbfedb8ca59843dec11c97ca3f308742265c3fc",
"shasum": ""
},
"require": {
@@ -20,7 +20,7 @@
"replace": {
"tecnickcom/tcpdf": "self.version"
},
"time": "2020-02-12T14:16:56+00:00",
"time": "2020-06-05T13:06:44+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -45,21 +45,22 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-3.0-only"
"LGPL-3.0"
],
"authors": [
{
"name": "Nicola Asuni",
"email": "info@tecnick.com",
"role": "lead"
},
{
"name": "Combodo",
"email": "contact@combodo.com"
}
],
"description": "TCPDF fork adding requirements for iTop: Specific fonts.",
"homepage": "https://github.com/combodo-itop-libs/TCPDF"
"homepage": "https://github.com/combodo-itop-libs/TCPDF",
"funding": [
{
"url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&currency_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project",
"type": "custom"
}
]
},
{
"name": "nikic/php-parser",