Skip to content
This repository has been archived by the owner on Jul 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #10 from lextira/2.0
Browse files Browse the repository at this point in the history
Removed curly braces for array access for php 7.4 compatibility
  • Loading branch information
RamonSmit authored Mar 24, 2020
2 parents 94dc2d1 + bdbbe0e commit 9fedaf9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/LynX39/LaraPdfMerger/tcpdf/tcpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -16890,10 +16890,10 @@ protected function getHtmlDomArray($html) {
if (($dom[$key]['value'] == 'pre') OR ($dom[$key]['value'] == 'tt')) {
$dom[$key]['fontname'] = $this->default_monospaced_font;
}
if (!empty($dom[$key]['value']) AND ($dom[$key]['value'][0] == 'h') AND (intval($dom[$key]['value']{1}) > 0) AND (intval($dom[$key]['value']{1}) < 7)) {
if (!empty($dom[$key]['value']) AND ($dom[$key]['value'][0] == 'h') AND (intval($dom[$key]['value'][1]) > 0) AND (intval($dom[$key]['value'][1]) < 7)) {
// headings h1, h2, h3, h4, h5, h6
if (!isset($dom[$key]['attribute']['size']) AND !isset($dom[$key]['style']['font-size'])) {
$headsize = (4 - intval($dom[$key]['value']{1})) * 2;
$headsize = (4 - intval($dom[$key]['value'][1])) * 2;
$dom[$key]['fontsize'] = $dom[0]['fontsize'] + $headsize;
}
if (!isset($dom[$key]['style']['font-weight'])) {
Expand Down
12 changes: 6 additions & 6 deletions src/LynX39/LaraPdfMerger/tcpdf/tcpdf_barcodes_1d.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ protected function barcode_code39($code, $extended=false, $checksum=false) {
} 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;
Expand Down Expand Up @@ -667,7 +667,7 @@ protected function barcode_code93($code) {
} 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;
Expand Down Expand Up @@ -929,7 +929,7 @@ protected function barcode_i25($code, $checksum=false) {
$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) {
Expand Down Expand Up @@ -1180,7 +1180,7 @@ protected function barcode_c128($code, $type='') {
}
}
for ($i = 0; $i < $seq[2]; ++$i) {
$char = $seq[1]{$i};
$char = $seq[1][$i];
$char_id = ord($char);
if (($char_id >= 241) AND ($char_id <= 244)) {
$code_data[] = $fnc_a[$char_id];
Expand Down Expand Up @@ -1223,7 +1223,7 @@ protected function barcode_c128($code, $type='') {
}
}
for ($i = 0; $i < $seq[2]; ++$i) {
$char = $seq[1]{$i};
$char = $seq[1][$i];
$char_id = ord($char);
if (($char_id >= 241) AND ($char_id <= 244)) {
$code_data[] = $fnc_b[$char_id];
Expand All @@ -1240,7 +1240,7 @@ protected function barcode_c128($code, $type='') {
$code_data[] = 99;
}
for ($i = 0; $i < $seq[2]; $i+=2) {
$chrnum = $seq[1]{$i}.$seq[1]{$i+1};
$chrnum = $seq[1]{$i}.$seq[1][$i+1];
$code_data[] = intval($chrnum);
}
break;
Expand Down

0 comments on commit 9fedaf9

Please sign in to comment.