diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 69afb85..378920c 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,6 @@ +6.0.072 (2014-04-27) + - Deprecated curly braces substring syntax was replaced with square braces. + 6.0.071 (2014-04-25) - Bug #911 "error with buffered png pics" was fixed. diff --git a/README.TXT b/README.TXT index d30fb3c..5b39d1d 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.071 -Release date: 2014-04-25 +Version: 6.0.072 +Release date: 2014-04-27 Author: Nicola Asuni Copyright (c) 2002-2014: diff --git a/composer.json b/composer.json index c8805af..246d00b 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "tecnick.com/tcpdf", - "version": "6.0.071", + "version": "6.0.072", "homepage": "http://www.tcpdf.org/", "type": "library", "description": "TCPDF is a PHP class for generating PDF documents.", diff --git a/examples/example_009.php b/examples/example_009.php index bb72d8b..235dd72 100644 --- a/examples/example_009.php +++ b/examples/example_009.php @@ -104,7 +104,7 @@ for ($i = 0; $i < 3; ++$i) { $fitbox = $horizontal_alignments[$i].' '; $x = 15; for ($j = 0; $j < 3; ++$j) { - $fitbox{1} = $vertical_alignments[$j]; + $fitbox[1] = $vertical_alignments[$j]; $pdf->Rect($x, $y, $w, $h, 'F', array(), array(128,255,128)); $pdf->Image('images/image_demo.jpg', $x, $y, $w, $h, 'JPG', '', '', false, 300, '', false, false, 0, $fitbox, false, false); $x += 32; // new column @@ -120,7 +120,7 @@ for ($i = 0; $i < 3; ++$i) { $fitbox = $horizontal_alignments[$i].' '; $x = 115; for ($j = 0; $j < 3; ++$j) { - $fitbox{1} = $vertical_alignments[$j]; + $fitbox[1] = $vertical_alignments[$j]; $pdf->Rect($x, $y, $w, $h, 'F', array(), array(128,255,255)); $pdf->Image('images/image_demo.jpg', $x, $y, $w, $h, 'JPG', '', '', false, 300, '', false, false, 0, $fitbox, false, false); $x += 27; // new column diff --git a/include/barcodes/pdf417.php b/include/barcodes/pdf417.php index f68c207..07b36b9 100644 --- a/include/barcodes/pdf417.php +++ b/include/barcodes/pdf417.php @@ -935,11 +935,11 @@ class PDF417 { } if ($sublen == 6) { $t = bcmul(''.ord($code[0]), '1099511627776'); - $t = bcadd($t, bcmul(''.ord($code{1}), '4294967296')); - $t = bcadd($t, bcmul(''.ord($code{2}), '16777216')); - $t = bcadd($t, bcmul(''.ord($code{3}), '65536')); - $t = bcadd($t, bcmul(''.ord($code{4}), '256')); - $t = bcadd($t, ''.ord($code{5})); + $t = bcadd($t, bcmul(''.ord($code[1]), '4294967296')); + $t = bcadd($t, bcmul(''.ord($code[2]), '16777216')); + $t = bcadd($t, bcmul(''.ord($code[3]), '65536')); + $t = bcadd($t, bcmul(''.ord($code[4]), '256')); + $t = bcadd($t, ''.ord($code[5])); // tmp array for the 6 bytes block $cw6 = array(); do { diff --git a/include/tcpdf_images.php b/include/tcpdf_images.php index 4e0aba9..8967234 100644 --- a/include/tcpdf_images.php +++ b/include/tcpdf_images.php @@ -218,7 +218,7 @@ class TCPDF_IMAGES { if (count($icc) > 0) { ksort($icc); $icc = implode('', $icc); - if ((ord($icc{36}) != 0x61) OR (ord($icc{37}) != 0x63) OR (ord($icc{38}) != 0x73) OR (ord($icc{39}) != 0x70)) { + if ((ord($icc[36]) != 0x61) OR (ord($icc[37]) != 0x63) OR (ord($icc[38]) != 0x73) OR (ord($icc[39]) != 0x70)) { // invalid ICC profile $icc = false; } @@ -300,9 +300,9 @@ class TCPDF_IMAGES { // read transparency info $t = TCPDF_STATIC::rfread($f, $n); if ($ct == 0) { // DeviceGray - $trns = array(ord($t{1})); + $trns = array(ord($t[1])); } elseif ($ct == 2) { // DeviceRGB - $trns = array(ord($t{1}), ord($t{3}), ord($t{5})); + $trns = array(ord($t[1]), ord($t[3]), ord($t[5])); } else { // Indexed if ($n > 0) { $trns = array(); diff --git a/include/tcpdf_static.php b/include/tcpdf_static.php index d0e6253..bf84b94 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.071'; + private static $tcpdf_version = '6.0.072'; /** * String alias for total number of pages. @@ -137,7 +137,7 @@ class TCPDF_STATIC { public static function set_mqr($mqr) { if (!defined('PHP_VERSION_ID')) { $version = PHP_VERSION; - define('PHP_VERSION_ID', (($version[0] * 10000) + ($version{2} * 100) + $version{4})); + define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4])); } if (PHP_VERSION_ID < 50300) { @set_magic_quotes_runtime($mqr); @@ -153,7 +153,7 @@ class TCPDF_STATIC { public static function get_mqr() { if (!defined('PHP_VERSION_ID')) { $version = PHP_VERSION; - define('PHP_VERSION_ID', (($version[0] * 10000) + ($version{2} * 100) + $version{4})); + define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4])); } if (PHP_VERSION_ID < 50300) { return @get_magic_quotes_runtime(); @@ -2232,7 +2232,7 @@ class TCPDF_STATIC { break; } case ':': { // pseudo-class or pseudo-element - if ($attrib{1} == ':') { // pseudo-element + if ($attrib[1] == ':') { // pseudo-element // pseudo-elements are not supported! // (::first-line, ::first-letter, ::before, ::after) } else { // pseudo-class diff --git a/tcpdf.php b/tcpdf.php index 0f236bf..3c29ea1 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 6.0.071 + * @version 6.0.072 */ // 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.071 + * @version 6.0.072 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -6895,7 +6895,7 @@ class TCPDF { // height difference $hdiff = ($oldh - $h); // vertical alignment - switch (strtoupper($fitbox{1})) { + switch (strtoupper($fitbox[1])) { case 'T': { break; } diff --git a/tcpdf_barcodes_1d.php b/tcpdf_barcodes_1d.php index f99dd28..b0ca416 100644 --- a/tcpdf_barcodes_1d.php +++ b/tcpdf_barcodes_1d.php @@ -1445,7 +1445,7 @@ class TCPDFBarcode { $seq = '101'; // left guard bar if ($upce) { $bararray = array('code' => $upce_code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); - $p = $upce_parities[$code{1}][$r]; + $p = $upce_parities[$code[1]][$r]; for ($i = 0; $i < 6; ++$i) { $seq .= $codes[$p[$i]][$upce_code{$i}]; } @@ -1504,7 +1504,7 @@ class TCPDFBarcode { if ($len == 2) { $r = $code % 4; } elseif ($len == 5) { - $r = (3 * ($code[0] + $code{2} + $code{4})) + (9 * ($code{1} + $code{3})); + $r = (3 * ($code[0] + $code[2] + $code[4])) + (9 * ($code[1] + $code[3])); $r %= 10; } else { return false; @@ -2070,7 +2070,7 @@ class TCPDFBarcode { $binary_code = bcmul($binary_code, 10); $binary_code = bcadd($binary_code, $tracking_number[0]); $binary_code = bcmul($binary_code, 5); - $binary_code = bcadd($binary_code, $tracking_number{1}); + $binary_code = bcadd($binary_code, $tracking_number[1]); $binary_code .= substr($tracking_number, 2, 18); // convert to hexadecimal $binary_code = $this->dec_to_hex($binary_code);