From 5252fd2e968ef17854ec0915ab3c600272c00f8a Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Wed, 13 Aug 2014 17:57:25 +0100 Subject: [PATCH] 6.0.091 (2014-08-13) - Issue #325"Division by zero when css fontsize equals 0" was fixed. --- CHANGELOG.TXT | 3 +++ README.TXT | 4 ++-- composer.json | 2 +- include/tcpdf_static.php | 2 +- tcpdf.php | 14 +++++++++----- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index ac171c1..898a30f 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,6 @@ +6.0.091 (2014-08-13) + - Issue #325"Division by zero when css fontsize equals 0" was fixed. + 6.0.090 (2014-08-08) - Starting from this version TCPDF is also available in GitHub at https://github.com/tecnickcom/TCPDF - Function getmypid() was removed for better compatibility with shared hosting environments. diff --git a/README.TXT b/README.TXT index 183039d..dd89998 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.090 -Release date: 2014-08-08 +Version: 6.0.091 +Release date: 2014-08-13 Author: Nicola Asuni Copyright (c) 2002-2014: diff --git a/composer.json b/composer.json index c6cec5a..8afe07a 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "tecnick.com/tcpdf", - "version": "6.0.090", + "version": "6.0.091", "homepage": "http://www.tcpdf.org/", "type": "library", "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", diff --git a/include/tcpdf_static.php b/include/tcpdf_static.php index a43c517..d0d62e5 100644 --- a/include/tcpdf_static.php +++ b/include/tcpdf_static.php @@ -55,7 +55,7 @@ class TCPDF_STATIC { * Current TCPDF version. * @private static */ - private static $tcpdf_version = '6.0.090'; + private static $tcpdf_version = '6.0.091'; /** * String alias for total number of pages. diff --git a/tcpdf.php b/tcpdf.php index 513248e..94febbe 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 6.0.090 + * @version 6.0.091 */ // TCPDF configuration @@ -128,7 +128,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.090 + * @version 6.0.091 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -16748,7 +16748,11 @@ class TCPDF { } $dom[$key]['line-height'] = $this->getHTMLUnitToUnits($lineheight, 1, '%', true); if (substr($lineheight, -1) !== '%') { - $dom[$key]['line-height'] = (($dom[$key]['line-height'] - $this->cell_padding['T'] - $this->cell_padding['B']) / $dom[$key]['fontsize']); + if ($dom[$key]['fontsize'] <= 0) { + $dom[$key]['line-height'] = 1; + } else { + $dom[$key]['line-height'] = (($dom[$key]['line-height'] - $this->cell_padding['T'] - $this->cell_padding['B']) / $dom[$key]['fontsize']); + } } } }