summaryrefslogtreecommitdiff
path: root/vendor/tecnickcom
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2018-09-14 13:33:25 +0100
committerGreg Roach <fisharebest@webtrees.net>2018-09-14 13:33:25 +0100
commit8b5ff62d901640daf2a7ada1e0968fe12102d93b (patch)
tree168a5414a1cacf685e2d720843978a090565b5aa /vendor/tecnickcom
parentf5666b293031c8b46bbeb0f4dad21baec37d2c0a (diff)
downloadwebtrees-8b5ff62d901640daf2a7ada1e0968fe12102d93b.tar.gz
webtrees-8b5ff62d901640daf2a7ada1e0968fe12102d93b.tar.bz2
webtrees-8b5ff62d901640daf2a7ada1e0968fe12102d93b.zip
Update TCPDF for compatibility with PHP 7.3
Diffstat (limited to 'vendor/tecnickcom')
-rw-r--r--vendor/tecnickcom/tcpdf/CHANGELOG.TXT4
-rw-r--r--vendor/tecnickcom/tcpdf/composer.json2
-rw-r--r--vendor/tecnickcom/tcpdf/include/tcpdf_static.php2
-rw-r--r--vendor/tecnickcom/tcpdf/tcpdf.php38
4 files changed, 30 insertions, 16 deletions
diff --git a/vendor/tecnickcom/tcpdf/CHANGELOG.TXT b/vendor/tecnickcom/tcpdf/CHANGELOG.TXT
index d6e4cf05e9..88658e61bb 100644
--- a/vendor/tecnickcom/tcpdf/CHANGELOG.TXT
+++ b/vendor/tecnickcom/tcpdf/CHANGELOG.TXT
@@ -1,5 +1,5 @@
-Unreleased
- - fix Undesired mouseover effect on links in PDF on Chrome Pdf Viewer
+6.2.19
+ - Merge various fixes for PHP 7.3 compatibility and security.
6.2.13 (2016-06-10)
- 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.
diff --git a/vendor/tecnickcom/tcpdf/composer.json b/vendor/tecnickcom/tcpdf/composer.json
index 83ffd67b8b..3a6d1c37e3 100644
--- a/vendor/tecnickcom/tcpdf/composer.json
+++ b/vendor/tecnickcom/tcpdf/composer.json
@@ -1,6 +1,6 @@
{
"name": "tecnickcom/tcpdf",
- "version": "6.2.17",
+ "version": "6.2.19",
"homepage": "http://www.tcpdf.org/",
"type": "library",
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
diff --git a/vendor/tecnickcom/tcpdf/include/tcpdf_static.php b/vendor/tecnickcom/tcpdf/include/tcpdf_static.php
index aa42c850a2..166f5f91e2 100644
--- a/vendor/tecnickcom/tcpdf/include/tcpdf_static.php
+++ b/vendor/tecnickcom/tcpdf/include/tcpdf_static.php
@@ -55,7 +55,7 @@ class TCPDF_STATIC {
* Current TCPDF version.
* @private static
*/
- private static $tcpdf_version = '6.2.17';
+ private static $tcpdf_version = '6.2.19';
/**
* String alias for total number of pages.
diff --git a/vendor/tecnickcom/tcpdf/tcpdf.php b/vendor/tecnickcom/tcpdf/tcpdf.php
index ef411a17de..2c3f62992d 100644
--- a/vendor/tecnickcom/tcpdf/tcpdf.php
+++ b/vendor/tecnickcom/tcpdf/tcpdf.php
@@ -1,13 +1,13 @@
<?php
//============================================================+
// File name : tcpdf.php
-// Version : 6.2.13
+// Version : 6.2.19
// Begin : 2002-08-03
-// Last Update : 2015-06-18
+// Last Update : 2018-09-14
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
-// Copyright (C) 2002-2015 Nicola Asuni - Tecnick.com LTD
+// Copyright (C) 2002-2018 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
@@ -104,7 +104,7 @@
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
* @package com.tecnick.tcpdf
* @author Nicola Asuni
- * @version 6.2.8
+ * @version 6.2.19
*/
// TCPDF configuration
@@ -128,8 +128,11 @@ require_once(dirname(__FILE__).'/include/tcpdf_static.php');
* TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br>
* @package com.tecnick.tcpdf
* @brief PHP class for generating PDF documents without requiring external extensions.
- * @version 6.2.8
+ * @version 6.2.19
* @author Nicola Asuni - info@tecnick.com
+ * @IgnoreAnnotation("protected")
+ * @IgnoreAnnotation("public")
+ * @IgnoreAnnotation("pre")
*/
class TCPDF {
@@ -1994,10 +1997,6 @@ class TCPDF {
* @since 1.53.0.TC016
*/
public function __destruct() {
- // restore internal encoding
- if (isset($this->internal_encoding) AND !empty($this->internal_encoding)) {
- mb_internal_encoding($this->internal_encoding);
- }
// cleanup
$this->_destroy(true);
}
@@ -4453,6 +4452,7 @@ class TCPDF {
* @see SetFont()
*/
public function SetFontSize($size, $out=true) {
+ $size = (float)$size;
// font size in points
$this->FontSizePt = $size;
// font size in user units
@@ -6845,6 +6845,15 @@ class TCPDF {
$file = substr($file, 1);
$exurl = $file;
}
+ $wrappers = stream_get_wrappers();
+ foreach ($wrappers as $wrapper) {
+ if ($wrapper === 'http' || $wrapper === 'https') {
+ continue;
+ }
+ if (stripos($file, $wrapper.'://') === 0) {
+ $this->Error('Stream wrappers in file paths are not supported');
+ }
+ }
// check if is a local file
if (!@file_exists($file)) {
// try to encode spaces on filename
@@ -7750,6 +7759,10 @@ class TCPDF {
* @since 4.5.016 (2009-02-24)
*/
public function _destroy($destroyall=false, $preserve_objcopy=false) {
+ // restore internal encoding
+ if (isset($this->internal_encoding) AND !empty($this->internal_encoding)) {
+ mb_internal_encoding($this->internal_encoding);
+ }
if ($destroyall AND !$preserve_objcopy) {
// remove all temporary files
$tmpfiles = glob(K_PATH_CACHE.'__tcpdf_'.$this->file_id.'_*');
@@ -17783,7 +17796,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
// justify block
if (!TCPDF_STATIC::empty_string($this->lispacer)) {
$this->lispacer = '';
- continue;
+ break;
}
preg_match('/([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s](re)([\s]*)/x', $pmid, $xmatches);
if (!isset($xmatches[1])) {
@@ -18318,7 +18331,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
}
// text
$this->htmlvspace = 0;
- if ((!$this->premode) AND $this->isRTLTextDir()) {
+ $isRTLString = preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_RTL, $dom[$key]['value']) || preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_ARABIC, $dom[$key]['value']);
+ if ((!$this->premode) AND $this->isRTLTextDir() AND !$isRTLString) {
// reverse spaces order
$lsp = ''; // left spaces
$rsp = ''; // right spaces
@@ -18333,7 +18347,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
if ($newline) {
if (!$this->premode) {
$prelen = strlen($dom[$key]['value']);
- if ($this->isRTLTextDir()) {
+ if ($this->isRTLTextDir() AND !$isRTLString) {
// right trim except non-breaking space
$dom[$key]['value'] = $this->stringRightTrim($dom[$key]['value']);
} else {