From 94bfcb9bb445235329b6e5a84a124515b7ea1898 Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Thu, 18 Jul 2013 20:45:24 +0100 Subject: [PATCH] 6.0.021 (2013-07-18) - The bug caused by the preg_split function on some PHP 5.2.x versions was fixed. --- CHANGELOG.TXT | 3 +++ README.TXT | 4 ++-- composer.json | 2 +- include/tcpdf_fonts.php | 10 +++++----- include/tcpdf_static.php | 33 ++++++++++++++++++++++++++++++++- tcpdf.php | 14 +++++++------- 6 files changed, 50 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 213e479..6b87acf 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,6 @@ +6.0.021 (2013-07-18) + - The bug caused by the preg_split function on some PHP 5.2.x versions was fixed. + 6.0.020 (2013-06-04) - The method addTTFfont() was fixed (Bug item #813 Undefined offset). diff --git a/README.TXT b/README.TXT index 3e1ee62..ad384c4 100644 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 6.0.020 -Release date: 2013-06-04 +Version: 6.0.021 +Release date: 2013-07-18 Author: Nicola Asuni Copyright (c) 2002-2013: diff --git a/composer.json b/composer.json index 7a3c222..be0dac5 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "tecnick.com/tcpdf", - "version": "6.0.020", + "version": "6.0.021", "homepage": "http://www.tcpdf.org/", "type": "library", "description": "TCPDF is a PHP class for generating PDF documents.", diff --git a/include/tcpdf_fonts.php b/include/tcpdf_fonts.php index 5939395..5a384f8 100644 --- a/include/tcpdf_fonts.php +++ b/include/tcpdf_fonts.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 6.0.020 + * @version 6.0.021 */ // TCPDF configuration @@ -163,7 +163,7 @@ 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.
* @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 6.0.020 + * @version 6.0.021 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -6494,7 +6494,7 @@ class TCPDF { } // check the length of the next string $strrest = TCPDF_FONTS::UniArrSubString($uchars, ($sep + $endspace)); - $nextstr = preg_split('/'.$this->re_space['p'].'/'.$this->re_space['m'], $this->stringTrim($strrest)); + $nextstr = TCPDF_STATIC::pregSplit('/'.$this->re_space['p'].'/', $this->re_space['m'], $this->stringTrim($strrest)); if (isset($nextstr[0]) AND ($this->GetStringWidth($nextstr[0]) > $pw)) { // truncate the word because do not fit on a full page width $tmpstr = TCPDF_FONTS::UniArrSubString($uchars, $j, $i); @@ -18149,7 +18149,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $tmp_fontsize = isset($dom[$nkey]['fontsize']) ? $dom[$nkey]['fontsize'] : $this->FontSizePt; $same_textdir = ($dom[$nkey]['dir'] == $dom[$key]['dir']); } else { - $nextstr = preg_split('/'.$this->re_space['p'].'+/'.$this->re_space['m'], $dom[$nkey]['value']); + $nextstr = TCPDF_STATIC::pregSplit('/'.$this->re_space['p'].'+/', $this->re_space['m'], $dom[$nkey]['value']); if (isset($nextstr[0]) AND $same_textdir) { $wadj += $this->GetStringWidth($nextstr[0], $tmp_fontname, $tmp_fontstyle, $tmp_fontsize); if (isset($nextstr[1])) { @@ -18162,7 +18162,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } if (($wadj > 0) AND (($strlinelen + $wadj) >= $cwa)) { $wadj = 0; - $nextstr = preg_split('/'.$this->re_space['p'].'/'.$this->re_space['m'], $dom[$key]['value']); + $nextstr = TCPDF_STATIC::pregSplit('/'.$this->re_space['p'].'/', $this->re_space['m'], $dom[$key]['value']); $numblks = count($nextstr); if ($numblks > 1) { // try to split on blank spaces