From 8d20c494fbc5dd18d3b665afae2d70a4d59cd85d Mon Sep 17 00:00:00 2001 From: mhedderich <31847838+mhedderich@users.noreply.github.com> Date: Wed, 15 Jan 2020 22:24:49 +0100 Subject: [PATCH] Fixed datamatrix.php for PHP 7.4 Resolved deprecation error: "Deprecated: Array and string offset access syntax with curly braces is deprecated" --- include/barcodes/datamatrix.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))) {