Open mediaessenz opened 1 year ago
Due to a problem (bug?) under PHP 8.1 the last function call (bcmod) throw an error, but no exception:
return '1' === bcmod($check, 97, 0);
This way, a invalid IBAN like "DE)$270200011511683151" will result in a program interuption with no chance to catch them – even not with a try-catch!
To fix this problem, I suggest to add a pre check like this:
if (!is_numeric($check)) { return false; } return '1' === bcmod($check, 97, 0);
Due to a problem (bug?) under PHP 8.1 the last function call (bcmod) throw an error, but no exception:
This way, a invalid IBAN like "DE)$270200011511683151" will result in a program interuption with no chance to catch them – even not with a try-catch!
To fix this problem, I suggest to add a pre check like this: