Skip to content

Commit d96798a

Browse files
committed
Fix possible casting issues in codabar #92
1 parent 77157d2 commit d96798a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Types/TypeCodabar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ public function getBarcodeData(string $code): Barcode
4343
$code = 'A' . strtoupper($code) . 'A';
4444

4545
for ($i = 0; $i < strlen($code); ++$i) {
46-
if (! isset($this->conversionTable[$code[$i]])) {
46+
if (! isset($this->conversionTable[(string)$code[$i]])) {
4747
throw new InvalidCharacterException('Char ' . $code[$i] . ' is unsupported');
4848
}
4949

50-
$seq = $this->conversionTable[$code[$i]];
50+
$seq = $this->conversionTable[(string)$code[$i]];
5151
for ($j = 0; $j < 8; ++$j) {
5252
if (($j % 2) == 0) {
5353
$t = true; // bar

0 commit comments

Comments
 (0)