Skip to content

Commit 6bab859

Browse files
committed
update for PHP 7.1
this fixes the "A non-numeric value encountered" warning introduced in PHP 7.1. This fixes the test ean13_generator_throws_exception_if_invalid_chars_are_used
1 parent e7e17b7 commit 6bab859

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BarcodeGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,7 @@ protected function barcode_eanupc($code, $len = 13)
15021502
}
15031503
$sum_b = 0;
15041504
for ($i = 0; $i < $data_len; $i += 2) {
1505-
$sum_b += ($code[$i]);
1505+
$sum_b += intval(($code[$i]));
15061506
}
15071507
if ($len < 13) {
15081508
$sum_b *= 3;

0 commit comments

Comments
 (0)