Page MenuHomePhabricator

Avoid fatal PHP errors when IBAN validation fails
Open, Needs TriagePublic


When the user manages to send an invalid IBAN to the server as part of creating a donation, the controller can't render the error message, because it makes the assumption that the values it gets are strings. The IBAN, however, is an IBAN class.

Error message:

Recoverable fatal error: Object of class WMDE\Fundraising\PaymentContext\Domain\Model\Iban could not be converted to string in /usr/share/nginx/www/ on line 252

This error has low priority because this can only happen when the client-side validation fails. But it points at a possible architecture violation (using a domain object in the presentation layer).