Verified Commit 8662a5b5 authored by Damien's avatar Damien

FEAT #12346 TIME 0:05 Vendor

parent e077734b
This diff is collapsed.
......@@ -12,12 +12,11 @@ branches:
- develop
php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- hhvm-3.18
- hhvm-nightly
- nightly
......@@ -29,7 +28,7 @@ matrix:
include:
- os: linux
language: php
php: 5.3
php: 5.4
dist: precise
addons:
......
......@@ -80,7 +80,10 @@ class Pdf extends \Com\Tecnick\Color\Spot
if (($colobj = $this->getColorObj($color)) !== null) {
return $colobj->getJsPdfColor();
}
} catch (ColorException $e) {
} catch (Exception $e) {
if (!($e instanceof ColorException)) {
throw $e;
}
}
// default transparent color
return 'color.'.self::$jscolor[0];
......@@ -97,11 +100,17 @@ class Pdf extends \Com\Tecnick\Color\Spot
{
try {
return $this->getSpotColorObj($color);
} catch (ColorException $e) {
} catch (Exception $e) {
if (!($e instanceof ColorException)) {
throw $e;
}
}
try {
return $this->getColorObj($color);
} catch (ColorException $e) {
} catch (Exception $e) {
if (!($e instanceof ColorException)) {
throw $e;
}
}
return null;
}
......@@ -125,14 +134,20 @@ class Pdf extends \Com\Tecnick\Color\Spot
$tint = strtoupper($tint);
}
return sprintf('/CS%d %s'."\n", $col['i'], $tint);
} catch (ColorException $e) {
} catch (Exception $e) {
if (!($e instanceof ColorException)) {
throw $e;
}
}
try {
$col = $this->getColorObj($color);
if ($col !== null) {
return $col->getPdfColor($stroke);
}
} catch (ColorException $e) {
} catch (Exception $e) {
if (!($e instanceof ColorException)) {
throw $e;
}
}
return '';
}
......
......@@ -6,6 +6,8 @@
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
2002-2019 Nicola Asuni - Tecnick.com LTD
**********************************************************************
**********************************************************************
......
......@@ -6,7 +6,7 @@
* **category** Library
* **author** Nicola Asuni <info@tecnick.com>
* **copyright** 2002-2018 Nicola Asuni - Tecnick.com LTD
* **copyright** 2002-2019 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
......
{
"name": "tecnickcom/tcpdf",
"version": "6.2.26",
"version": "6.3.2",
"homepage": "http://www.tcpdf.org/",
"type": "library",
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
......
......@@ -358,7 +358,7 @@ class TCPDF_COLORS {
$color_code = self::$webcolor[$color];
} else {
// spot color
$returncolor = self::getSpotColor($color, $spotc);
$returncolor = self::getSpotColor($hcolor, $spotc);
if ($returncolor === false) {
$returncolor = $defcol;
}
......
......@@ -279,7 +279,7 @@ class TCPDF_FILTERS {
// convert string to binary string
$bitstring = '';
for ($i = 0; $i < $data_length; ++$i) {
$bitstring .= sprintf('%08b', ord($data{$i}));
$bitstring .= sprintf('%08b', ord($data[$i]));
}
// get the number of bits
$data_length = strlen($bitstring);
......@@ -376,7 +376,7 @@ class TCPDF_FILTERS {
$i = 0;
while($i < $data_length) {
// get current byte value
$byte = ord($data{$i});
$byte = ord($data[$i]);
if ($byte == 128) {
// a length value of 128 denote EOD
break;
......@@ -389,7 +389,7 @@ class TCPDF_FILTERS {
} else {
// if length is in the range 129 to 255,
// the following single byte shall be copied 257 - length (2 to 128) times during decompression
$decoded .= str_repeat($data{($i + 1)}, (257 - $byte));
$decoded .= str_repeat($data[($i + 1)], (257 - $byte));
// move to next block
$i += 2;
}
......
......@@ -1664,6 +1664,7 @@ class TCPDF_FONTS {
* @public static
*/
public static function unichr($c, $unicode=true) {
$c = intval($c);
if (!$unicode) {
return chr($c);
} elseif ($c <= 0x7F) {
......
......@@ -311,7 +311,7 @@ class TCPDF_IMAGES {
if ($n > 0) {
$trns = array();
for ($i = 0; $i < $n; ++ $i) {
$trns[] = ord($t{$i});
$trns[] = ord($t[$i]);
}
}
}
......
......@@ -55,7 +55,7 @@ class TCPDF_STATIC {
* Current TCPDF version.
* @private static
*/
private static $tcpdf_version = '6.2.26';
private static $tcpdf_version = '6.3.2';
/**
* String alias for total number of pages.
......@@ -1926,10 +1926,10 @@ class TCPDF_STATIC {
$alt = array_unique($alt);
foreach ($alt as $path) {
if (!self::file_exists($path)) {
return false;
continue;
}
$ret = @file_get_contents($path);
if ($ret !== false) {
if ( $ret != false ) {
return $ret;
}
// try to use CURL for URLs
......
This diff is collapsed.
......@@ -531,10 +531,10 @@ class TCPDF_PARSER {
if ($char == '(') {
$open_bracket = 1;
while ($open_bracket > 0) {
if (!isset($this->pdfdata{$strpos})) {
if (!isset($this->pdfdata[$strpos])) {
break;
}
$ch = $this->pdfdata{$strpos};
$ch = $this->pdfdata[$strpos];
switch ($ch) {
case '\\': { // REVERSE SOLIDUS (5Ch) (Backslash)
// skip next character
......@@ -578,7 +578,7 @@ class TCPDF_PARSER {
}
case '<': // \x3C LESS-THAN SIGN
case '>': { // \x3E GREATER-THAN SIGN
if (isset($this->pdfdata{($offset + 1)}) AND ($this->pdfdata{($offset + 1)} == $char)) {
if (isset($this->pdfdata[($offset + 1)]) AND ($this->pdfdata[($offset + 1)] == $char)) {
// dictionary object
$objtype = $char.$char;
$offset += 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment