diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..ca5b429 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +custom: ['https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project'] diff --git a/include/barcodes/datamatrix.php b/include/barcodes/datamatrix.php index 19b46fa..783f99d 100644 --- a/include/barcodes/datamatrix.php +++ b/include/barcodes/datamatrix.php @@ -629,7 +629,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))) { diff --git a/tcpdf.php b/tcpdf.php index 4dedf41..ab5e138 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -4722,7 +4722,7 @@ class TCPDF { */ public function SetLink($link, $y=0, $page=-1) { $fixed = false; - if (!empty($page) AND is_string($page) AND ($page[0] == '*')) { + if (!empty($page) AND (substr($page, 0, 1) == '*')) { $page = intval(substr($page, 1)); // this page number will not be changed when moving/add/deleting pages $fixed = true; @@ -12279,7 +12279,7 @@ class TCPDF { $x = $this->w; } $fixed = false; - if (!empty($page) AND ($page[0] == '*')) { + if (!empty($page) AND (substr($page, 0, 1) == '*')) { $page = intval(substr($page, 1)); // this page number will not be changed when moving/add/deleting pages $fixed = true; @@ -12382,7 +12382,7 @@ class TCPDF { $x = $this->w; } $fixed = false; - if (!empty($page) AND ($page[0] == '*')) { + if ((string)$page && (((string)$page)[0] == '*')) { $page = intval(substr($page, 1)); // this page number will not be changed when moving/add/deleting pages $fixed = true;