Skip to content

Commit fb1ea0a

Browse files
committed
Fixed problem that IBANs get wrongly formatted if the inputted data already contains spaces
1 parent 46f1f6d commit fb1ea0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Entity/Embeddable/PayeeInfo.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ public function getIban(): ?string
183183
*/
184184
public function getIbanFormatted(): string
185185
{
186-
return chunk_split($this->iban ?? '', 4, ' ');
186+
//Use IBAN version without spaces to get correct formatting, independent of the input
187+
return chunk_split($this->getIbanWithoutSpaces(), 4, ' ');
187188
}
188189

189190
/**

0 commit comments

Comments
 (0)