From 75599231fe52c5fe48031e8fea6a9eea5166f521 Mon Sep 17 00:00:00 2001
From: Prasad <prasad@vtiger.com>
Date: Sat, 2 Oct 2021 10:13:25 +0530
Subject: [PATCH] PHP 8 compatability

---
 libraries/tcpdf/barcodes.php                  | 116 +++++++++---------
 libraries/tcpdf/datamatrix.php                |  14 +--
 .../tcpdf/fonts/old/makefont/makefont.php     |  10 +-
 libraries/tcpdf/fonts/ttf2ufm/makefontuni.php |   4 +-
 libraries/tcpdf/fonts/utils/makefont.php      |  10 +-
 libraries/tcpdf/pdf417.php                    |  18 +--
 libraries/tcpdf/tcpdf.php                     |  68 +++++-----
 libraries/tcpdf/tcpdf_filters.php             |  10 +-
 libraries/tcpdf/tcpdf_parser.php              |   6 +-
 vtlib/thirdparty/network/Request.php          |  18 +--
 10 files changed, 137 insertions(+), 137 deletions(-)

diff --git a/libraries/tcpdf/barcodes.php b/libraries/tcpdf/barcodes.php
index 0c94f12e3..b6257d7de 100644
--- a/libraries/tcpdf/barcodes.php
+++ b/libraries/tcpdf/barcodes.php
@@ -297,7 +297,7 @@ class TCPDFBarcode {
 		$k = 0;
 		$clen = strlen($code);
 		for ($i = 0; $i < $clen; ++$i) {
-			$char = $code{$i};
+			$char = $code[$i];
 			if(!isset($chr[$char])) {
 				// invalid character
 				return false;
@@ -308,7 +308,7 @@ class TCPDFBarcode {
 				} else {
 					$t = false; // space
 				}
-				$w = $chr[$char]{$j};
+				$w = $chr[$char][$j];
 				$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
 				$bararray['maxw'] += $w;
 				++$k;
@@ -363,10 +363,10 @@ class TCPDFBarcode {
 		$code_ext = '';
 		$clen = strlen($code);
 		for ($i = 0 ; $i < $clen; ++$i) {
-			if (ord($code{$i}) > 127) {
+			if (ord($code[$i]) > 127) {
 				return false;
 			}
-			$code_ext .= $encode[$code{$i}];
+			$code_ext .= $encode[$code[$i]];
 		}
 		return $code_ext;
 	}
@@ -386,7 +386,7 @@ class TCPDFBarcode {
 		$sum = 0;
 		$clen = strlen($code);
 		for ($i = 0 ; $i < $clen; ++$i) {
-			$k = array_keys($chars, $code{$i});
+			$k = array_keys($chars, $code[$i]);
 			$sum += $k[0];
 		}
 		$j = ($sum % 43);
@@ -487,10 +487,10 @@ class TCPDFBarcode {
 		$code_ext = '';
 		$clen = strlen($code);
 		for ($i = 0 ; $i < $clen; ++$i) {
-			if (ord($code{$i}) > 127) {
+			if (ord($code[$i]) > 127) {
 				return false;
 			}
-			$code_ext .= $encode[$code{$i}];
+			$code_ext .= $encode[$code[$i]];
 		}
 		// checksum
 		$code .= $this->checksum_code93($code);
@@ -500,7 +500,7 @@ class TCPDFBarcode {
 		$k = 0;
 		$clen = strlen($code);
 		for ($i = 0; $i < $clen; ++$i) {
-			$char = $code{$i};
+			$char = $code[$i];
 			if(!isset($chr[$char])) {
 				// invalid character
 				return false;
@@ -511,7 +511,7 @@ class TCPDFBarcode {
 				} else {
 					$t = false; // space
 				}
-				$w = $chr[$char]{$j};
+				$w = $chr[$char][$j];
 				$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
 				$bararray['maxw'] += $w;
 				++$k;
@@ -542,7 +542,7 @@ class TCPDFBarcode {
 		$p = 1;
 		$check = 0;
 		for ($i = ($len - 1); $i >= 0; --$i) {
-			$k = array_keys($chars, $code{$i});
+			$k = array_keys($chars, $code[$i]);
 			$check += ($k[0] * $p);
 			++$p;
 			if ($p > 20) {
@@ -556,7 +556,7 @@ class TCPDFBarcode {
 		$p = 1;
 		$check = 0;
 		for ($i = $len; $i >= 0; --$i) {
-			$k = array_keys($chars, $code{$i});
+			$k = array_keys($chars, $code[$i]);
 			$check += ($k[0] * $p);
 			++$p;
 			if ($p > 15) {
@@ -578,11 +578,11 @@ class TCPDFBarcode {
 		$len = strlen($code);
 		$sum = 0;
 		for ($i = 0; $i < $len; $i+=2) {
-			$sum += $code{$i};
+			$sum += $code[$i];
 		}
 		$sum *= 3;
 		for ($i = 1; $i < $len; $i+=2) {
-			$sum += ($code{$i});
+			$sum += ($code[$i]);
 		}
 		$r = $sum % 10;
 		if($r > 0) {
@@ -623,7 +623,7 @@ class TCPDFBarcode {
 			$p = 2;
 			$check = 0;
 			for ($i = ($clen - 1); $i >= 0; --$i) {
-				$check += (hexdec($code{$i}) * $p);
+				$check += (hexdec($code[$i]) * $p);
 				++$p;
 				if ($p > 7) {
 					$p = 2;
@@ -638,7 +638,7 @@ class TCPDFBarcode {
 		$seq = '110'; // left guard
 		$clen = strlen($code);
 		for ($i = 0; $i < $clen; ++$i) {
-			$digit = $code{$i};
+			$digit = $code[$i];
 			if (!isset($chr[$digit])) {
 				// invalid character
 				return false;
@@ -681,7 +681,7 @@ class TCPDFBarcode {
 		$seq = '11011010';
 		$clen = strlen($code);
 		for ($i = 0; $i < $clen; ++$i) {
-			$digit = $code{$i};
+			$digit = $code[$i];
 			if (!isset($chr[$digit])) {
 				// invalid character
 				return false;
@@ -706,8 +706,8 @@ class TCPDFBarcode {
 		$k = 0;
 		for ($i = 0; $i < $len; ++$i) {
 			$w += 1;
-			if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq{$i} != $seq{($i+1)}))) {
-				if ($seq{$i} == '1') {
+			if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq[$i] != $seq[($i+1)]))) {
+				if ($seq[$i] == '1') {
 					$t = true; // bar
 				} else {
 					$t = false; // space
@@ -758,8 +758,8 @@ class TCPDFBarcode {
 		$k = 0;
 		$clen = strlen($code);
 		for ($i = 0; $i < $clen; $i = ($i + 2)) {
-			$char_bar = $code{$i};
-			$char_space = $code{$i+1};
+			$char_bar = $code[$i];
+			$char_space = $code[$i+1];
 			if((!isset($chr[$char_bar])) OR (!isset($chr[$char_space]))) {
 				// invalid character
 				return false;
@@ -768,7 +768,7 @@ class TCPDFBarcode {
 			$seq = '';
 			$chrlen = strlen($chr[$char_bar]);
 			for ($s = 0; $s < $chrlen; $s++){
-				$seq .= $chr[$char_bar]{$s} . $chr[$char_space]{$s};
+				$seq .= $chr[$char_bar][$s] . $chr[$char_space][$s];
 			}
 			$seqlen = strlen($seq);
 			for ($j = 0; $j < $seqlen; ++$j) {
@@ -777,7 +777,7 @@ class TCPDFBarcode {
 				} else {
 					$t = false; // space
 				}
-				$w = $seq{$j};
+				$w = $seq[$j];
 				$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
 				$bararray['maxw'] += $w;
 				++$k;
@@ -933,7 +933,7 @@ class TCPDFBarcode {
 				$new_code = '';
 				$hclen = (strlen($code) / 2);
 				for ($i = 0; $i < $hclen; ++$i) {
-					$new_code .= chr(intval($code{(2 * $i)}.$code{(2 * $i + 1)}));
+					$new_code .= chr(intval($code[(2 * $i)].$code[(2 * $i + 1)]));
 				}
 				$code = $new_code;
 				break;
@@ -946,7 +946,7 @@ class TCPDFBarcode {
 		$sum = $startid;
 		$clen = strlen($code);
 		for ($i = 0; $i < $clen; ++$i) {
-			$sum +=  (strpos($keys, $code{$i}) * ($i+1));
+			$sum +=  (strpos($keys, $code[$i]) * ($i+1));
 		}
 		$check = ($sum % 103);
 		// add start, check and stop codes
@@ -955,9 +955,9 @@ class TCPDFBarcode {
 		$k = 0;
 		$len = strlen($code);
 		for ($i = 0; $i < $len; ++$i) {
-			$ck = strpos($keys, $code{$i});
+			$ck = strpos($keys, $code[$i]);
 			if (($i == 0) OR ($i > ($len-4))) {
-				$char_num = ord($code{$i});
+				$char_num = ord($code[$i]);
 				$seq = $chr[$char_num];
 			} elseif(($ck >= 0) AND isset($chr[$ck])) {
 					$seq = $chr[$ck];
@@ -971,7 +971,7 @@ class TCPDFBarcode {
 				} else {
 					$t = false; // space
 				}
-				$w = $seq{$j};
+				$w = $seq[$j];
 				$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
 				$bararray['maxw'] += $w;
 				++$k;
@@ -1003,14 +1003,14 @@ class TCPDFBarcode {
 		// calculate check digit
 		$sum_a = 0;
 		for ($i = 1; $i < $data_len; $i+=2) {
-			$sum_a += $code{$i};
+			$sum_a += $code[$i];
 		}
 		if ($len > 12) {
 			$sum_a *= 3;
 		}
 		$sum_b = 0;
 		for ($i = 0; $i < $data_len; $i+=2) {
-			$sum_b += ($code{$i});
+			$sum_b += ($code[$i]);
 		}
 		if ($len < 13) {
 			$sum_b *= 3;
@@ -1022,7 +1022,7 @@ class TCPDFBarcode {
 		if ($code_len == $data_len) {
 			// add check digit
 			$code .= $r;
-		} elseif ($r !== intval($code{$data_len})) {
+		} elseif ($r !== intval($code[$data_len])) {
 			// wrong checkdigit
 			return false;
 		}
@@ -1131,9 +1131,9 @@ 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}];
+				$seq .= $codes[$p[$i]][$upce_code[$i]];
 			}
 			$seq .= '010101'; // right guard bar
 		} else {
@@ -1141,17 +1141,17 @@ class TCPDFBarcode {
 			$half_len = ceil($len / 2);
 			if ($len == 8) {
 				for ($i = 0; $i < $half_len; ++$i) {
-					$seq .= $codes['A'][$code{$i}];
+					$seq .= $codes['A'][$code[$i]];
 				}
 			} else {
-				$p = $parities[$code{0}];
+				$p = $parities[$code[0]];
 				for ($i = 1; $i < $half_len; ++$i) {
-					$seq .= $codes[$p[$i-1]][$code{$i}];
+					$seq .= $codes[$p[$i-1]][$code[$i]];
 				}
 			}
 			$seq .= '01010'; // center guard bar
 			for ($i = $half_len; $i < $len; ++$i) {
-				$seq .= $codes['C'][$code{$i}];
+				$seq .= $codes['C'][$code[$i]];
 			}
 			$seq .= '101'; // right guard bar
 		}
@@ -1159,8 +1159,8 @@ class TCPDFBarcode {
 		$w = 0;
 		for ($i = 0; $i < $clen; ++$i) {
 			$w += 1;
-			if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq{$i} != $seq{($i+1)}))) {
-				if ($seq{$i} == '1') {
+			if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq[$i] != $seq[($i+1)]))) {
+				if ($seq[$i] == '1') {
 					$t = true; // bar
 				} else {
 					$t = false; // space
@@ -1190,7 +1190,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;
@@ -1241,10 +1241,10 @@ class TCPDFBarcode {
 		);	
 		$p = $parities[$len][$r];
 		$seq = '1011'; // left guard bar
-		$seq .= $codes[$p[0]][$code{0}];
+		$seq .= $codes[$p[0]][$code[0]];
 		for ($i = 1; $i < $len; ++$i) {
 			$seq .= '01'; // separator
-			$seq .= $codes[$p[$i]][$code{$i}];
+			$seq .= $codes[$p[$i]][$code[$i]];
 		}
 		$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
 		return $this->binseq_to_array($seq, $bararray);
@@ -1295,7 +1295,7 @@ class TCPDFBarcode {
 		// calculate checksum
 		$sum = 0;
 		for ($i = 0; $i < $len; ++$i) {
-			$sum += intval($code{$i});
+			$sum += intval($code[$i]);
 		}
 		$chkd = ($sum % 10);
 		if($chkd > 0) {
@@ -1309,7 +1309,7 @@ class TCPDFBarcode {
 		$bararray['maxw'] += 2;
 		for ($i = 0; $i < $len; ++$i) {
 			for ($j = 0; $j < 5; ++$j) {
-				$h = $barlen[$code{$i}][$j];
+				$h = $barlen[$code[$i]][$j];
 				$p = floor(1 / $h);
 				$bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p);
 				$bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0);
@@ -1422,8 +1422,8 @@ class TCPDFBarcode {
 			$row = 0;
 			$col = 0;
 			for ($i = 0; $i < $len; ++$i) {
-				$row += $checktable[$code{$i}][0];
-				$col += $checktable[$code{$i}][1];
+				$row += $checktable[$code[$i]][0];
+				$col += $checktable[$code[$i]][1];
 			}
 			$row %= 6;
 			$col %= 6;
@@ -1440,7 +1440,7 @@ class TCPDFBarcode {
 		}
 		for ($i = 0; $i < $len; ++$i) {
 			for ($j = 0; $j < 4; ++$j) {
-				switch ($barmode[$code{$i}][$j]) {
+				switch ($barmode[$code[$i]][$j]) {
 					case 1: {
 						$p = 0;
 						$h = 2;
@@ -1512,17 +1512,17 @@ class TCPDFBarcode {
 		$code = 'A'.strtoupper($code).'A';
 		$len = strlen($code);
 		for ($i = 0; $i < $len; ++$i) {
-			if (!isset($chr[$code{$i}])) {
+			if (!isset($chr[$code[$i]])) {
 				return false;
 			}
-			$seq = $chr[$code{$i}];
+			$seq = $chr[$code[$i]];
 			for ($j = 0; $j < 8; ++$j) {
 				if (($j % 2) == 0) {
 					$t = true; // bar
 				} else {
 					$t = false; // space
 				}
-				$w = $seq{$j};
+				$w = $seq[$j];
 				$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
 				$bararray['maxw'] += $w;
 				++$k;
@@ -1563,7 +1563,7 @@ class TCPDFBarcode {
 		$p = 1;
 		$check = 0;
 		for ($i = ($len - 1); $i >= 0; --$i) {
-			$digit = $code{$i};
+			$digit = $code[$i];
 			if ($digit == '-') {
 				$dval = 10;
 			} else {
@@ -1585,7 +1585,7 @@ class TCPDFBarcode {
 			$p = 1;
 			$check = 0;
 			for ($i = $len; $i >= 0; --$i) {
-				$digit = $code{$i};
+				$digit = $code[$i];
 				if ($digit == '-') {
 					$dval = 10;
 				} else {
@@ -1604,17 +1604,17 @@ class TCPDFBarcode {
 		$code = 'S'.$code.'S';
 		$len += 3;
 		for ($i = 0; $i < $len; ++$i) {
-			if (!isset($chr[$code{$i}])) {
+			if (!isset($chr[$code[$i]])) {
 				return false;
 			}
-			$seq = $chr[$code{$i}];
+			$seq = $chr[$code[$i]];
 			for ($j = 0; $j < 6; ++$j) {
 				if (($j % 2) == 0) {
 					$t = true; // bar
 				} else {
 					$t = false; // space
 				}
-				$w = $seq{$j};
+				$w = $seq[$j];
 				$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
 				$bararray['maxw'] += $w;
 				++$k;
@@ -1683,7 +1683,7 @@ class TCPDFBarcode {
 		$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 2, 'bcode' => array());
 		$len = strlen($seq);
 		for ($i = 0; $i < $len; ++$i) {
-			switch ($seq{$i}) {
+			switch ($seq[$i]) {
 				case '1': {
 					$p = 1;
 					$h = 1;
@@ -1755,9 +1755,9 @@ class TCPDFBarcode {
 			}
 		}
 		$binary_code = bcmul($binary_code, 10);
-		$binary_code = bcadd($binary_code, $tracking_number{0});
+		$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);
@@ -1872,7 +1872,7 @@ class TCPDFBarcode {
 		$bitval = 1;
 		$len = strlen($hex);
 		for($pos = ($len - 1); $pos >= 0; --$pos) {
-			$dec = bcadd($dec, bcmul(hexdec($hex{$pos}), $bitval));
+			$dec = bcadd($dec, bcmul(hexdec($hex[$pos]), $bitval));
 			$bitval = bcmul($bitval, 16);
 		}
 		return $dec;
diff --git a/libraries/tcpdf/datamatrix.php b/libraries/tcpdf/datamatrix.php
index ff92011fe..a91d6cc05 100755
--- a/libraries/tcpdf/datamatrix.php
+++ b/libraries/tcpdf/datamatrix.php
@@ -552,7 +552,7 @@ class Datamatrix {
 				return ENC_C40;
 			}
 			// get char
-			$chr = ord($data{($pos + $charscount)});
+			$chr = ord($data[($pos + $charscount)]);
 			$charscount++;
 			// STEP L
 			if ($this->isCharMode($chr, ENC_ASCII_NUM)) {
@@ -627,7 +627,7 @@ class Datamatrix {
 					if ($numch[ENC_C40] == $numch[ENC_X12]) {
 						$k = ($pos + $charscount + 1);
 						while ($k < $data_length) {
-							$tmpchr = ord($data{$k});
+							$tmpchr = ord($data[$k]);
 							if ($this->isCharMode($tmpchr, ENC_X12)) {
 								return ENC_X12;
 							} elseif (!($this->isCharMode($tmpchr, ENC_X12) OR $this->isCharMode($tmpchr, ENC_C40))) {
@@ -709,7 +709,7 @@ class Datamatrix {
 		while ($pos < $data_lenght) {
 			switch ($enc) {
 				case ENC_ASCII: { // STEP B. While in ASCII encodation
-					if (($data_lenght > 1) AND ($pos < ($data_lenght - 1)) AND ($this->isCharMode(ord($data{($pos)}), ENC_ASCII_NUM) AND $this->isCharMode(ord($data{($pos + 1)}), ENC_ASCII_NUM))) {
+					if (($data_lenght > 1) AND ($pos < ($data_lenght - 1)) AND ($this->isCharMode(ord($data[($pos)]), ENC_ASCII_NUM) AND $this->isCharMode(ord($data[($pos + 1)]), ENC_ASCII_NUM))) {
 						// 1. If the next data sequence is at least 2 consecutive digits, encode the next two digits as a double digit in ASCII mode.
 						$cw[] = (intval(substr($data, $pos, 2)) + 130);
 						++$cw_num;
@@ -724,7 +724,7 @@ class Datamatrix {
 							++$cw_num;
 						} else {
 							// get new byte
-							$chr = ord($data{($pos)});
+							$chr = ord($data[($pos)]);
 							++$pos;
 							if ($this->isCharMode($chr, ENC_ASCII_EXT)) {
 								// 3. If the next data character is extended ASCII (greater than 127) encode it in ASCII mode first using the Upper Shift (value 235) character.
@@ -752,7 +752,7 @@ class Datamatrix {
 					$charset = $this->chset[$set_id];
 					do {
 						// 2. process the next character in C40 encodation.
-						$chr = ord($data{($epos)});
+						$chr = ord($data[($epos)]);
 						++$epos;
 						// check for extended character
 						if ($chr & 0x80) {
@@ -848,7 +848,7 @@ class Datamatrix {
 					$field_lenght = 0;
 					while ($epos < $data_lenght) {
 						// 2. process the next character in EDIFACT encodation.
-						$chr = ord($data{($epos)});
+						$chr = ord($data[($epos)]);
 						++$epos;
 						$temp_cw[] = $chr;
 						++$field_lenght;
@@ -908,7 +908,7 @@ class Datamatrix {
 							break; // exit from B256 mode
 						} else {
 							// 2. Otherwise, process the next character in Base 256 encodation.
-							$chr = ord($data{($pos)});
+							$chr = ord($data[($pos)]);
 							++$pos;
 							$temp_cw[] = $chr;
 							++$field_lenght;
diff --git a/libraries/tcpdf/fonts/old/makefont/makefont.php b/libraries/tcpdf/fonts/old/makefont/makefont.php
index 1c830173a..df9783aa7 100644
--- a/libraries/tcpdf/fonts/old/makefont/makefont.php
+++ b/libraries/tcpdf/fonts/old/makefont/makefont.php
@@ -15,7 +15,7 @@ function ReadMap($enc)
 	$cc2gn=array();
 	foreach($a as $l)
 	{
-		if($l{0}=='!')
+		if($l[0]=='!')
 		{
 			$e=preg_split('/[ \\t]+/',rtrim($l));
 			$cc=hexdec(substr($e[0],1));
@@ -289,9 +289,9 @@ function CheckTTF($file)
 }
 
 /*******************************************************************************
-* $fontfile : chemin du fichier TTF (ou chaîne vide si pas d'incorporation)    *
+* $fontfile : chemin du fichier TTF (ou cha�ne vide si pas d'incorporation)    *
 * $afmfile :  chemin du fichier AFM                                            *
-* $enc :      encodage (ou chaîne vide si la police est symbolique)            *
+* $enc :      encodage (ou cha�ne vide si la police est symbolique)            *
 * $patch :    patch optionnel pour l'encodage                                  *
 * $type :     type de la police si $fontfile est vide                          *
 *******************************************************************************/
@@ -363,7 +363,7 @@ function MakeFont($fontfile,$afmfile,$enc='cp1252',$patch=array(),$type='TrueTyp
 		if($type=='Type1')
 		{
 			//Find first two sections and discard third one
-			$header=(ord($file{0})==128);
+			$header=(ord($file[0])==128);
 			if($header)
 			{
 				//Strip first binary header
@@ -373,7 +373,7 @@ function MakeFont($fontfile,$afmfile,$enc='cp1252',$patch=array(),$type='TrueTyp
 			if(!$pos)
 				die('<B>Error:</B> font file does not seem to be valid Type1');
 			$size1=$pos+6;
-			if($header and ord($file{$size1})==128)
+			if($header and ord($file[$size1])==128)
 			{
 				//Strip second binary header
 				$file=substr($file,0,$size1).substr($file,$size1+6);
diff --git a/libraries/tcpdf/fonts/ttf2ufm/makefontuni.php b/libraries/tcpdf/fonts/ttf2ufm/makefontuni.php
index a6da13b86..b38f69b7a 100644
--- a/libraries/tcpdf/fonts/ttf2ufm/makefontuni.php
+++ b/libraries/tcpdf/fonts/ttf2ufm/makefontuni.php
@@ -38,8 +38,8 @@ function ReadUFM($file, &$cidtogidmap)
           
         // Set GID
         if ($cc >= 0 && $cc < 0xFFFF && $glyph) {
-          $cidtogidmap{$cc*2} = chr($glyph >> 8);
-          $cidtogidmap{$cc*2 + 1} = chr($glyph & 0xFF);
+          $cidtogidmap[$cc*2] = chr($glyph >> 8);
+          $cidtogidmap[$cc*2 + 1] = chr($glyph & 0xFF);
         }        
       }
       if($gn=='.notdef' && !isset($fm['MissingWidth']))
diff --git a/libraries/tcpdf/fonts/utils/makefont.php b/libraries/tcpdf/fonts/utils/makefont.php
index 92cbd188b..58a2148ac 100644
--- a/libraries/tcpdf/fonts/utils/makefont.php
+++ b/libraries/tcpdf/fonts/utils/makefont.php
@@ -131,7 +131,7 @@ function MakeFont($fontfile, $fmfile, $embedded=true, $enc="cp1252", $patch=arra
 		fclose($f);
 		if ($type == 'Type1') {
 			//Find first two sections and discard third one
-			$header = (ord($file{0}) == 128);
+			$header = (ord($file[0]) == 128);
 			if ($header) {
 				//Strip first binary header
 				$file = substr($file, 6);
@@ -141,7 +141,7 @@ function MakeFont($fontfile, $fmfile, $embedded=true, $enc="cp1252", $patch=arra
 				die('Error: font file does not seem to be valid Type1');
 			}
 			$size1 = $pos+6;
-			if ($header AND (ord($file{$size1}) == 128)) {
+			if ($header AND (ord($file[$size1]) == 128)) {
 				//Strip second binary header
 				$file = substr($file, 0, $size1).substr($file, $size1+6);
 			}
@@ -203,7 +203,7 @@ function ReadMap($enc) {
 	}
 	$cc2gn = array();
 	foreach ($a as $l) {
-		if ($l{0} == '!') {
+		if ($l[0] == '!') {
 			$e = preg_split('/[ \\t]+/',rtrim($l));
 			$cc = hexdec(substr($e[0],1));
 			$gn = $e[2];
@@ -252,8 +252,8 @@ function ReadUFM($file, &$cidtogidmap) {
 			}
 			// Set GID
 			if ($cc >= 0 && $cc < 0xFFFF && $glyph) {
-				$cidtogidmap{$cc*2} = chr($glyph >> 8);
-				$cidtogidmap{$cc*2 + 1} = chr($glyph & 0xFF);
+				$cidtogidmap[$cc*2] = chr($glyph >> 8);
+				$cidtogidmap[$cc*2 + 1] = chr($glyph & 0xFF);
 			}
 			}
 			if(($gn == '.notdef') AND (!isset($fm['MissingWidth']))) {
diff --git a/libraries/tcpdf/pdf417.php b/libraries/tcpdf/pdf417.php
index b5e895bc9..1f153b22d 100755
--- a/libraries/tcpdf/pdf417.php
+++ b/libraries/tcpdf/pdf417.php
@@ -878,7 +878,7 @@ class PDF417 {
 				$txtarr = array(); // array of characters and sub-mode switching characters
 				$codelen = strlen($code);
 				for ($i = 0; $i < $codelen; ++$i) {
-					$chval = ord($code{$i});
+					$chval = ord($code[$i]);
 					if (($k = array_search($chval, $this->textsubmodes[$submode])) !== false) {
 						// we are on the same sub-mode
 						$txtarr[] = $k;
@@ -888,7 +888,7 @@ class PDF417 {
 							// search new sub-mode
 							if (($s != $submode) AND (($k = array_search($chval, $this->textsubmodes[$s])) !== false)) {
 								// $s is the new submode
-								if (((($i + 1) == $codelen) OR ((($i + 1) < $codelen) AND (array_search(ord($code{($i + 1)}), $this->textsubmodes[$submode]) !== false))) AND (($s == 3) OR (($s == 0) AND ($submode == 1)))) {
+								if (((($i + 1) == $codelen) OR ((($i + 1) < $codelen) AND (array_search(ord($code[($i + 1)]), $this->textsubmodes[$submode]) !== false))) AND (($s == 3) OR (($s == 0) AND ($submode == 1)))) {
 									// shift (temporary change only for this char)
 									if ($s == 3) {
 										// shift to puntuaction
@@ -934,12 +934,12 @@ class PDF417 {
 						$sublen = strlen($code);
 					}
 					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 = 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]));
 						do {
 							$d = bcmod($t, '900');
 							$t = bcdiv($t, '900');
@@ -947,7 +947,7 @@ class PDF417 {
 						} while ($t != '0');
 					} else {
 						for ($i = 0; $i < $sublen; ++$i) {
-							$cw[] = ord($code{$i});
+							$cw[] = ord($code[$i]);
 						}
 					}
 					$code = $rest;
diff --git a/libraries/tcpdf/tcpdf.php b/libraries/tcpdf/tcpdf.php
index 5a5314964..98aeda9c0 100644
--- a/libraries/tcpdf/tcpdf.php
+++ b/libraries/tcpdf/tcpdf.php
@@ -69,7 +69,7 @@
 // dullus for text Justification.
 // Bob Vincent (pillarsdotnet@users.sourceforge.net) for <li> value attribute.
 // Patrick Benny for text stretch suggestion on Cell().
-// Johannes Güntert for JavaScript support.
+// Johannes G�ntert for JavaScript support.
 // Denis Van Nuffelen for Dynamic Form.
 // Jacek Czekaj for multibyte justification
 // Anthony Ferrara for the reintroduction of legacy image methods.
@@ -80,7 +80,7 @@
 // Mohamad Ali Golkar, Saleh AlMatrafe, Charles Abbott for Arabic and Persian support.
 // Moritz Wagner and Andreas Wurmser for graphic functions.
 // Andrew Whitehead for core fonts support.
-// Esteban Joël Marín for OpenType font conversion.
+// Esteban Jo�l Mar�n for OpenType font conversion.
 // Teus Hagen for several suggestions and fixes.
 // Yukihiro Nakadaira for CID-0 CJK fonts fixes.
 // Kosmas Papachristos for some CSS improvements.
@@ -5686,12 +5686,12 @@ if (!class_exists('TCPDF', false)) {
 					$font = file_get_contents($fontfile);
 					$compressed = (substr($file, -2) == '.z');
 					if ((!$compressed) AND (isset($info['length2']))) {
-						$header = (ord($font{0}) == 128);
+						$header = (ord($font[0]) == 128);
 						if ($header) {
 							//Strip first binary header
 							$font = substr($font, 6);
 						}
-						if ($header AND (ord($font{$info['length1']}) == 128)) {
+						if ($header AND (ord($font[$info['length1']]) == 128)) {
 							//Strip second binary header
 							$font = substr($font, 0, $info['length1']).substr($font, ($info['length1'] + 6));
 						}
@@ -6645,7 +6645,7 @@ if (!class_exists('TCPDF', false)) {
 				$strarr = array();
 				$strlen = strlen($str);
 				for ($i=0; $i < $strlen; ++$i) {
-					$strarr[] = ord($str{$i});
+					$strarr[] = ord($str[$i]);
 				}
 				// insert new value on cache
 				$this->cache_UTF8StringToArray['_'.$str] = $strarr;
@@ -6657,7 +6657,7 @@ if (!class_exists('TCPDF', false)) {
 			$str .= ''; // force $str to be a string
 			$length = strlen($str);
 			for ($i = 0; $i < $length; ++$i) {
-				$char = ord($str{$i}); // get one string character at time
+				$char = ord($str[$i]); // get one string character at time
 				if (count($bytes) == 0) { // get starting octect
 					if ($char <= 0x7F) {
 						$unicode[] = $char; // use the character "as is" because is ASCII
@@ -6895,7 +6895,7 @@ if (!class_exists('TCPDF', false)) {
 		 * @access public
 		 */
 		public function addHtmlLink($url, $name, $fill=0, $firstline=false, $color='', $style=-1) {
-			if (!$this->empty_string($url) AND ($url{0} == '#')) {
+			if (!$this->empty_string($url) AND ($url[0] == '#')) {
 				// convert url to internal link
 				$page = intval(substr($url, 1));
 				$url = $this->AddLink();
@@ -7039,7 +7039,7 @@ if (!class_exists('TCPDF', false)) {
 				$j = 0;
 				for ($i = 0; $i < 256; ++$i) {
 					$t = $rc4[$i];
-					$j = ($j + $t + ord($k{$i})) % 256;
+					$j = ($j + $t + ord($k[$i])) % 256;
 					$rc4[$i] = $rc4[$j];
 					$rc4[$j] = $t;
 				}
@@ -7059,7 +7059,7 @@ if (!class_exists('TCPDF', false)) {
 				$rc4[$a] = $rc4[$b];
 				$rc4[$b] = $t;
 				$k = $rc4[($rc4[$a] + $rc4[$b]) % 256];
-				$out .= chr(ord($text{$i}) ^ $k);
+				$out .= chr(ord($text[$i]) ^ $k);
 			}
 			return $out;
 		}
@@ -8992,7 +8992,7 @@ if (!class_exists('TCPDF', false)) {
 		/*
 		* Adds a javascript
 		* @access public
-		* @author Johannes Güntert, Nicola Asuni
+		* @author Johannes G�ntert, Nicola Asuni
 		* @since 2.1.002 (2008-02-12)
 		*/
 		public function IncludeJS($script) {
@@ -9002,7 +9002,7 @@ if (!class_exists('TCPDF', false)) {
 		/*
 		* Create a javascript PDF string.
 		* @access protected
-		* @author Johannes Güntert, Nicola Asuni
+		* @author Johannes G�ntert, Nicola Asuni
 		* @since 2.1.002 (2008-02-12)
 		*/
 		protected function _putjavascript() {
@@ -9712,7 +9712,7 @@ if (!class_exists('TCPDF', false)) {
 		* @param array $col1 first color (RGB components).
 		* @param array $col2 second color (RGB components).
 		* @param array $coords array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0).
-		* @author Andreas Würmser, Nicola Asuni
+		* @author Andreas W�rmser, Nicola Asuni
 		* @since 3.1.000 (2008-06-09)
 		* @access public
 		*/
@@ -9730,7 +9730,7 @@ if (!class_exists('TCPDF', false)) {
 		* @param array $col1 first color (RGB components).
 		* @param array $col2 second color (RGB components).
 		* @param array $coords array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined.
-		* @author Andreas Würmser, Nicola Asuni
+		* @author Andreas W�rmser, Nicola Asuni
 		* @since 3.1.000 (2008-06-09)
 		* @access public
 		*/
@@ -9752,7 +9752,7 @@ if (!class_exists('TCPDF', false)) {
 		* @param array $coords <ul><li>for one patch mesh: array(float x1, float y1, .... float x12, float y12): 12 pairs of coordinates (normally from 0 to 1) which specify the Bezier control points that define the patch. First pair is the lower left edge point, next is its right control point (control point 2). Then the other points are defined in the order: control point 1, edge point, control point 2 going counter-clockwise around the patch. Last (x12, y12) is the first edge point's left control point (control point 1).</li><li>for two or more patch meshes: array[number of patches]: arrays with the following keys for each patch: f: where to put that patch (0 = first patch, 1, 2, 3 = right, top and left of precedent patch - I didn't figure this out completely - just try and error ;-) points: 12 pairs of coordinates of the Bezier control points as above for the first patch, 8 pairs of coordinates for the following patches, ignoring the coordinates already defined by the precedent patch (I also didn't figure out the order of these - also: try and see what's happening) colors: must be 4 colors for the first patch, 2 colors for the following patches</li></ul>
 		* @param array $coords_min minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0
 		* @param array $coords_max maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1
-		* @author Andreas Würmser, Nicola Asuni
+		* @author Andreas W�rmser, Nicola Asuni
 		* @since 3.1.000 (2008-06-09)
 		* @access public
 		*/
@@ -9832,7 +9832,7 @@ if (!class_exists('TCPDF', false)) {
 		* @param float $y ordinate of the top left corner of the rectangle.
 		* @param float $w width of the rectangle.
 		* @param float $h height of the rectangle.
-		* @author Andreas Würmser, Nicola Asuni
+		* @author Andreas W�rmser, Nicola Asuni
 		* @since 3.1.000 (2008-06-09)
 		* @access protected
 		*/
@@ -9855,7 +9855,7 @@ if (!class_exists('TCPDF', false)) {
 		* @param array $col1 first color (RGB components).
 		* @param array $col2 second color (RGB components).
 		* @param array $coords array of coordinates.
-		* @author Andreas Würmser, Nicola Asuni
+		* @author Andreas W�rmser, Nicola Asuni
 		* @since 3.1.000 (2008-06-09)
 		* @access protected
 		*/
@@ -9879,7 +9879,7 @@ if (!class_exists('TCPDF', false)) {
 		
 		/**
 		* Output shaders.
-		* @author Andreas Würmser, Nicola Asuni
+		* @author Andreas W�rmser, Nicola Asuni
 		* @since 3.1.000 (2008-06-09)
 		* @access protected
 		*/
@@ -10159,7 +10159,7 @@ if (!class_exists('TCPDF', false)) {
 			$cnt = count($lines);
 			for ($i=0; $i < $cnt; ++$i) {
 				$line = $lines[$i];
-				if (($line == '') OR ($line{0} == '%')) {
+				if (($line == '') OR ($line[0] == '%')) {
 					continue;
 				}
 				$len = strlen($line);
@@ -10210,7 +10210,7 @@ if (!class_exists('TCPDF', false)) {
 					case 'V':
 					case 'L':
 					case 'C': {
-						$line{$len-1} = strtolower($cmd);
+						$line[$len-1] = strtolower($cmd);
 						$this->_out($line);
 						break;
 					}
@@ -10887,7 +10887,7 @@ if (!class_exists('TCPDF', false)) {
 					$tagname = strtolower($tag[1]);
 					// check if we are inside a table header
 					if ($tagname == 'thead') {
-						if ($element{0} == '/') {
+						if ($element[0] == '/') {
 							$thead = false;
 						} else {
 							$thead = true;
@@ -10897,7 +10897,7 @@ if (!class_exists('TCPDF', false)) {
 					}
 					$dom[$key]['tag'] = true;
 					$dom[$key]['value'] = $tagname;
-					if ($element{0} == '/') {
+					if ($element[0] == '/') {
 						// closing html tag
 						$dom[$key]['opening'] = false;
 						$dom[$key]['parent'] = end($level);
@@ -11040,10 +11040,10 @@ if (!class_exists('TCPDF', false)) {
 								}
 							}
 							// font style
-							if (isset($dom[$key]['style']['font-weight']) AND (strtolower($dom[$key]['style']['font-weight']{0}) == 'b')) {
+							if (isset($dom[$key]['style']['font-weight']) AND (strtolower($dom[$key]['style']['font-weight'][0]) == 'b')) {
 								$dom[$key]['fontstyle'] .= 'B';
 							}
-							if (isset($dom[$key]['style']['font-style']) AND (strtolower($dom[$key]['style']['font-style']{0}) == 'i')) {
+							if (isset($dom[$key]['style']['font-style']) AND (strtolower($dom[$key]['style']['font-style'][0]) == 'i')) {
 								$dom[$key]['fontstyle'] .= '"I';
 							}
 							// font color
@@ -11060,9 +11060,9 @@ if (!class_exists('TCPDF', false)) {
 								foreach ($decors as $dec) {
 									$dec = trim($dec);
 									if (!$this->empty_string($dec)) {
-										if ($dec{0} == 'u') {
+										if ($dec[0] == 'u') {
 											$dom[$key]['fontstyle'] .= 'U';
-										} elseif ($dec{0} == 'l') {
+										} elseif ($dec[0] == 'l') {
 											$dom[$key]['fontstyle'] .= 'D';
 										}
 									}
@@ -11078,7 +11078,7 @@ if (!class_exists('TCPDF', false)) {
 							}
 							// check for text alignment
 							if (isset($dom[$key]['style']['text-align'])) {
-								$dom[$key]['align'] = strtoupper($dom[$key]['style']['text-align']{0});
+								$dom[$key]['align'] = strtoupper($dom[$key]['style']['text-align'][0]);
 							}
 							// check for border attribute
 							if (isset($dom[$key]['style']['border'])) {
@@ -11101,9 +11101,9 @@ if (!class_exists('TCPDF', false)) {
 							// font size
 							if (isset($dom[$key]['attribute']['size'])) {
 								if ($key > 0) {
-									if ($dom[$key]['attribute']['size']{0} == '+') {
+									if ($dom[$key]['attribute']['size'][0] == '+') {
 										$dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] + intval(substr($dom[$key]['attribute']['size'], 1));
-									} elseif ($dom[$key]['attribute']['size']{0} == '-') {
+									} elseif ($dom[$key]['attribute']['size'][0] == '-') {
 										$dom[$key]['fontsize'] = $dom[($dom[$key]['parent'])]['fontsize'] - intval(substr($dom[$key]['attribute']['size'], 1));
 									} else {
 										$dom[$key]['fontsize'] = intval($dom[$key]['attribute']['size']);
@@ -11140,8 +11140,8 @@ if (!class_exists('TCPDF', false)) {
 						if (($dom[$key]['value'] == 'pre') OR ($dom[$key]['value'] == 'tt')) {
 							$dom[$key]['fontname'] = $this->default_monospaced_font;
 						}
-						if (($dom[$key]['value']{0} == 'h') AND (intval($dom[$key]['value']{1}) > 0) AND (intval($dom[$key]['value']{1}) < 7)) {
-							$headsize = (4 - intval($dom[$key]['value']{1})) * 2;
+						if (($dom[$key]['value'][0] == 'h') AND (intval($dom[$key]['value'][1]) > 0) AND (intval($dom[$key]['value'][1]) < 7)) {
+							$headsize = (4 - intval($dom[$key]['value'][1])) * 2;
 							$dom[$key]['fontsize'] = $dom[0]['fontsize'] + $headsize;
 							$dom[$key]['fontstyle'] .= 'B';
 						}
@@ -11189,7 +11189,7 @@ if (!class_exists('TCPDF', false)) {
 						}
 						// check for text alignment
 						if (isset($dom[$key]['attribute']['align']) AND (!$this->empty_string($dom[$key]['attribute']['align'])) AND ($dom[$key]['value'] !== 'img')) {
-							$dom[$key]['align'] = strtoupper($dom[$key]['attribute']['align']{0});
+							$dom[$key]['align'] = strtoupper($dom[$key]['attribute']['align'][0]);
 						}
 					} // end opening tag
 				} else {
@@ -12117,9 +12117,9 @@ if (!class_exists('TCPDF', false)) {
 							foreach ($decors as $dec) {
 								$dec = trim($dec);
 								if (!$this->empty_string($dec)) {
-									if ($dec{0} == 'u') {
+									if ($dec[0] == 'u') {
 										$this->HREF['style'] .= 'U';
-									} elseif ($dec{0} == 'l') {
+									} elseif ($dec[0] == 'l') {
 										$this->HREF['style'] .= 'D';
 									}
 								}
@@ -12181,7 +12181,7 @@ if (!class_exists('TCPDF', false)) {
 						$imglink = '';
 						if (isset($this->HREF['url']) AND !$this->empty_string($this->HREF['url'])) {
 							$imglink = $this->HREF['url'];
-							if ($imglink{0} == '#') {
+							if ($imglink[0] == '#') {
 								// convert url to internal link
 								$page = intval(substr($imglink, 1));
 								$imglink = $this->AddLink();
diff --git a/libraries/tcpdf/tcpdf_filters.php b/libraries/tcpdf/tcpdf_filters.php
index f39a8fe9d..d8fc90a86 100644
--- a/libraries/tcpdf/tcpdf_filters.php
+++ b/libraries/tcpdf/tcpdf_filters.php
@@ -279,7 +279,7 @@ class TCPDF_FILTERS {
 		// convert string to binary string
 		$bitstring = '';
 		for ($i = 0; $i < $data_length; ++$i) {
-			$bitstring .= sprintf('%08b', ord($data{$i}));
+			$bitstring .= sprintf('%08b', ord($data[$i]));
 		}
 		// get the number of bits
 		$data_length = strlen($bitstring);
@@ -320,12 +320,12 @@ class TCPDF_FILTERS {
 				if ($index < $dix) {
 					// index exist on dictionary
 					$decoded .= $dictionary[$index];
-					$dic_val = $dictionary[$prev_index].$dictionary[$index]{0};
+					$dic_val = $dictionary[$prev_index].$dictionary[$index][0];
 					// store current index
 					$prev_index = $index;
 				} else {
 					// index do not exist on dictionary
-					$dic_val = $dictionary[$prev_index].$dictionary[$prev_index]{0};
+					$dic_val = $dictionary[$prev_index].$dictionary[$prev_index][0];
 					$decoded .= $dic_val;
 				}
 				// update dictionary
@@ -376,7 +376,7 @@ class TCPDF_FILTERS {
 		$i = 0;
 		while($i < $data_length) {
 			// get current byte value
-			$byte = ord($data{$i});
+			$byte = ord($data[$i]);
 			if ($byte == 128) {
 				// a length value of 128 denote EOD
 				break;
@@ -389,7 +389,7 @@ class TCPDF_FILTERS {
 			} else {
 				// if length is in the range 129 to 255,
 				// the following single byte shall be copied 257 - length (2 to 128) times during decompression
-				$decoded .= str_repeat($data{($i + 1)}, (257 - $byte));
+				$decoded .= str_repeat($data[($i + 1)], (257 - $byte));
 				// move to next block
 				$i += 2;
 			}
diff --git a/libraries/tcpdf/tcpdf_parser.php b/libraries/tcpdf/tcpdf_parser.php
index 122676034..decc7d85f 100644
--- a/libraries/tcpdf/tcpdf_parser.php
+++ b/libraries/tcpdf/tcpdf_parser.php
@@ -209,7 +209,7 @@ class TCPDF_PARSER {
 		// skip initial white space chars: \x00 null (NUL), \x09 horizontal tab (HT), \x0A line feed (LF), \x0C form feed (FF), \x0D carriage return (CR), \x20 space (SP)
 		$offset += strspn($this->pdfdata, "\x00\x09\x0a\x0c\x0d\x20", $offset);
 		// get first char
-		$char = $this->pdfdata{$offset};
+		$char = $this->pdfdata[$offset];
 		// get object type
 		switch ($char) {
 			case '%': { // \x25 PERCENT SIGN
@@ -243,7 +243,7 @@ class TCPDF_PARSER {
 						if (!isset($this->pdfdata{$strpos})) {
 							break;
 						}
-						$ch = $this->pdfdata{$strpos};
+						$ch = $this->pdfdata[$strpos];
 						switch ($ch) {
 							case '\\': { // REVERSE SOLIDUS (5Ch) (Backslash)
 								// skip next character
@@ -287,7 +287,7 @@ class TCPDF_PARSER {
 			}
 			case '<':   // \x3C LESS-THAN SIGN
 			case '>': { // \x3E GREATER-THAN SIGN
-				if (isset($this->pdfdata{($offset + 1)}) AND ($this->pdfdata{($offset + 1)} == $char)) {
+				if (isset($this->pdfdata[($offset + 1)]) AND ($this->pdfdata[($offset + 1)] == $char)) {
 					// dictionary object
 					$objtype = $char.$char;
 					$offset += 2;
diff --git a/vtlib/thirdparty/network/Request.php b/vtlib/thirdparty/network/Request.php
index 860310184..0cb8065c6 100644
--- a/vtlib/thirdparty/network/Request.php
+++ b/vtlib/thirdparty/network/Request.php
@@ -61,13 +61,13 @@ require_once dirname(__FILE__) . '/Net/URL.php';
 /**#@+
  * Constants for HTTP request methods
  */
-define('HTTP_REQUEST_METHOD_GET',     'GET',     true);
-define('HTTP_REQUEST_METHOD_HEAD',    'HEAD',    true);
-define('HTTP_REQUEST_METHOD_POST',    'POST',    true);
-define('HTTP_REQUEST_METHOD_PUT',     'PUT',     true);
-define('HTTP_REQUEST_METHOD_DELETE',  'DELETE',  true);
-define('HTTP_REQUEST_METHOD_OPTIONS', 'OPTIONS', true);
-define('HTTP_REQUEST_METHOD_TRACE',   'TRACE',   true);
+define('HTTP_REQUEST_METHOD_GET',     'GET'     );
+define('HTTP_REQUEST_METHOD_HEAD',    'HEAD'    );
+define('HTTP_REQUEST_METHOD_POST',    'POST'    );
+define('HTTP_REQUEST_METHOD_PUT',     'PUT'     );
+define('HTTP_REQUEST_METHOD_DELETE',  'DELETE'  );
+define('HTTP_REQUEST_METHOD_OPTIONS', 'OPTIONS' );
+define('HTTP_REQUEST_METHOD_TRACE',   'TRACE'   );
 /**#@-*/
 
 /**#@+
@@ -87,8 +87,8 @@ define('HTTP_REQUEST_ERROR_GZIP_CRC',       256);
 /**#@+
  * Constants for HTTP protocol versions
  */
-define('HTTP_REQUEST_HTTP_VER_1_0', '1.0', true);
-define('HTTP_REQUEST_HTTP_VER_1_1', '1.1', true);
+define('HTTP_REQUEST_HTTP_VER_1_0', '1.0');
+define('HTTP_REQUEST_HTTP_VER_1_1', '1.1');
 /**#@-*/
 
 if (extension_loaded('mbstring') && (2 & ini_get('mbstring.func_overload'))) {
-- 
GitLab