Skip to content

Commit afbbebf

Browse files
authored
Merge pull request #158 from Bernhard-Krop/error_with_code_11_using_check_digit_k
Solution for Issue: Error with Code 11 using check digit K
2 parents 938fd4e + 9e773e1 commit afbbebf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Types/TypeCode11.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private function getCheckDigitK(string $code): string
9191

9292
$p = 1;
9393
$check = 0;
94-
for ($i = strlen($code); $i >= 0; --$i) {
94+
for ($i = (strlen($code) - 1); $i >= 0; --$i) {
9595
$digit = $code[$i];
9696
if ($digit == '-') {
9797
$dval = 10;

0 commit comments

Comments
 (0)