From dc7dfc0ed969054dd7303cce17d42389f9b3bb36 Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Fri, 11 May 2012 18:59:03 +0100 Subject: [PATCH] 5.9.162 (2012-05-11) - A bug related to long text on TD cells was fixed. --- CHANGELOG.TXT | 3 +++ README.TXT | 4 ++-- tcpdf.php | 21 ++++++++++----------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 169cb81..5293ea0 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,6 @@ +5.9.162 (2012-05-11) + - A bug related to long text on TD cells was fixed. + 5.9.161 (2012-05-09) - A bug on XREF table was fixed (Bug ID: 3525051). - Deprecated Imagick:clone was replaced. diff --git a/README.TXT b/README.TXT index 6349cb7..fc0678c 100755 --- a/README.TXT +++ b/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 5.9.161 -Release date: 2012-05-09 +Version: 5.9.162 +Release date: 2012-05-11 Author: Nicola Asuni Copyright (c) 2002-2012: diff --git a/tcpdf.php b/tcpdf.php index fe366eb..7c9dc16 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 5.9.161 + * @version 5.9.162 */ // Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file. @@ -149,7 +149,7 @@ require_once(dirname(__FILE__).'/config/tcpdf_config.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 5.9.161 + * @version 5.9.162 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -160,7 +160,7 @@ class TCPDF { * Current TCPDF version. * @private */ - private $tcpdf_version = '5.9.161'; + private $tcpdf_version = '5.9.162'; // Protected properties @@ -7075,7 +7075,7 @@ class TCPDF { $w = $this->w - $this->rMargin - $this->x; } // max column width - $wmax = $w - $wadj; + $wmax = ($w - $wadj); if (!$firstline) { $wmax -= ($this->cell_padding['L'] + $this->cell_padding['R']); } @@ -7161,7 +7161,7 @@ class TCPDF { $this->rMargin += $margin['R']; } $w = $this->getRemainingWidth(); - $wmax = $w - $this->cell_padding['L'] - $this->cell_padding['R']; + $wmax = ($w - $this->cell_padding['L'] - $this->cell_padding['R']); } else { // 160 is the non-breaking space. // 173 is SHY (Soft Hypen). @@ -7197,8 +7197,8 @@ class TCPDF { // we have reached the end of column if ($sep == -1) { // check if the line was already started - if (($this->rtl AND ($this->x <= ($this->w - $this->rMargin - $chrwidth))) - OR ((!$this->rtl) AND ($this->x >= ($this->lMargin + $chrwidth)))) { + if (($this->rtl AND ($this->x <= ($this->w - $this->rMargin - $this->cell_padding['R'] - $margin['R'] - $chrwidth))) + OR ((!$this->rtl) AND ($this->x >= ($this->lMargin + $this->cell_padding['L'] + $margin['L'] + $chrwidth)))) { // print a void cell and go to next line $this->Cell($w, $h, '', 0, 1); $linebreak = true; @@ -26468,8 +26468,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: * @since 4.5.029 (2009-03-19) */ public function objclone($object) { - // clone is defined only in PHP 5 - return (version_compare(phpversion(), '5.0') < 0) ? $object : clone($object); + return @clone($object); } /**