Skip to content

Commit

Permalink
Merge pull request #158 from Bernhard-Krop/error_with_code_11_using_c…
Browse files Browse the repository at this point in the history
…heck_digit_k

Solution for Issue: Error with Code 11 using check digit K
  • Loading branch information
casperbakker authored Jun 14, 2022
2 parents 938fd4e + 9e773e1 commit afbbebf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Types/TypeCode11.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private function getCheckDigitK(string $code): string

$p = 1;
$check = 0;
for ($i = strlen($code); $i >= 0; --$i) {
for ($i = (strlen($code) - 1); $i >= 0; --$i) {
$digit = $code[$i];
if ($digit == '-') {
$dval = 10;
Expand Down

0 comments on commit afbbebf

Please sign in to comment.