diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT
index 1b5c520..6585c2f 100644
--- a/CHANGELOG.TXT
+++ b/CHANGELOG.TXT
@@ -1,3 +1,6 @@
+6.0.038 (2013-10-06)
+ - Bug #841 "Division by zero warning at writeHTML a
tag" was fixed.
+
6.0.037 (2013-09-30)
- Method getAllSpotColors() was added to return all spot colors.
- Method colorRegistrationBar() was extended to automatically print all spot colors and support individual spot colors.
diff --git a/README.TXT b/README.TXT
index 18d6974..593e4d2 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.037
-Release date: 2013-09-30
+Version: 6.0.038
+Release date: 2013-10-06
Author: Nicola Asuni
Copyright (c) 2002-2013:
diff --git a/composer.json b/composer.json
index ce1dc33..b86e643 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
{
"name": "tecnick.com/tcpdf",
- "version": "6.0.037",
+ "version": "6.0.038",
"homepage": "http://www.tcpdf.org/",
"type": "library",
"description": "TCPDF is a PHP class for generating PDF documents.",
diff --git a/include/tcpdf_static.php b/include/tcpdf_static.php
index ee4bcb7..9fb3c99 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.037';
+ private static $tcpdf_version = '6.0.038';
/**
* String alias for total number of pages.
diff --git a/tcpdf.php b/tcpdf.php
index aefdd55..4ba8dba 100644
--- a/tcpdf.php
+++ b/tcpdf.php
@@ -1,9 +1,9 @@
* @package com.tecnick.tcpdf
* @author Nicola Asuni
- * @version 6.0.037
+ * @version 6.0.038
*/
// 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.037
+ * @version 6.0.038
* @author Nicola Asuni - info@tecnick.com
*/
class TCPDF {
@@ -3656,7 +3656,7 @@ class TCPDF {
* Returns the array of spot colors.
* @return (array) Spot colors array.
* @public
- * @since 6.0.037 (2013-09-30)
+ * @since 6.0.038 (2013-09-30)
*/
public function getAllSpotColors() {
return $this->spot_colors;
@@ -11671,6 +11671,9 @@ class TCPDF {
* @since 4.9.019 (2010-04-26)
*/
protected function _outellipticalarc($xc, $yc, $rx, $ry, $xang=0, $angs=0, $angf=360, $pie=false, $nc=2, $startpoint=true, $ccw=true, $svg=false) {
+ if (($rx <= 0) OR ($ry < 0)) {
+ return;
+ }
$k = $this->k;
if ($nc < 2) {
$nc = 2;
@@ -14170,7 +14173,7 @@ class TCPDF {
* @param $y (float) ordinate of the registration mark center.
* @param $r (float) radius of the crop mark.
* @author Nicola Asuni
- * @since 6.0.037 (2013-09-30)
+ * @since 6.0.038 (2013-09-30)
* @public
*/
public function registrationMarkCMYK($x, $y, $r) {
@@ -16290,6 +16293,8 @@ class TCPDF {
$html = preg_replace('/'.$this->re_space['p'].'+/'.$this->re_space['m'], chr(32), $html); // replace multiple spaces with a single space
// trim string
$html = $this->stringTrim($html);
+ // fix br tag after li
+ $html = preg_replace('/
]*)>/', '
', $html);
// fix first image tag alignment
$html = preg_replace('/^
getFontAscent($fontname, $fontstyle, $fontsize);
$fontdescent = $this->getFontDescent($fontname, $fontstyle, $fontsize);
if (($fontname != $curfontname) OR ($fontstyle != $curfontstyle) OR ($fontsize != $curfontsize)
@@ -18128,7 +18133,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$this->resetLastH();
$minstartliney = $this->y;
$maxbottomliney = ($startliney + ($this->FontSize * $this->cell_height_ratio));
- $this->putHtmlListBullet($this->listnum, $this->lispacer, $pfontsize);
+ if (is_numeric($pfontsize) AND ($pfontsize > 0)) {
+ $this->putHtmlListBullet($this->listnum, $this->lispacer, $pfontsize);
+ }
$this->SetFont($curfontname, $curfontstyle, $curfontsize);
$this->resetLastH();
if (is_numeric($pfontsize) AND ($pfontsize > 0) AND is_numeric($curfontsize) AND ($curfontsize > 0) AND ($pfontsize != $curfontsize)) {
@@ -19928,32 +19935,11 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
return;
}
$symbol = strtolower($symbol);
- switch ($symbol) {
- case '!' :
- case '#' :
- case 'disc' :
- case 'circle' :
- case 'square' :
- case '1':
- case 'decimal':
- case 'decimal-leading-zero':
- case 'i':
- case 'lower-roman':
- case 'I':
- case 'upper-roman':
- case 'a':
- case 'lower-alpha':
- case 'lower-latin':
- case 'A':
- case 'upper-alpha':
- case 'upper-latin':
- case 'lower-greek': {
- $this->lisymbol = $symbol;
- break;
- }
- default : {
- $this->lisymbol = '';
- }
+ $valid_symbols = array('!', '#', 'disc', 'circle', 'square', '1', 'decimal', 'decimal-leading-zero', 'i', 'lower-roman', 'I', 'upper-roman', 'a', 'lower-alpha', 'lower-latin', 'A', 'upper-alpha', 'upper-latin', 'lower-greek');
+ if (in_array($symbol, $valid_symbols)) {
+ $this->lisymbol = $symbol;
+ } else {
+ $this->lisymbol = '';
}
}