terminal42 / contao-mailusername

MIT License
7 stars 5 forks source link

Warning on `fields.email.save` callback in front end #25

Closed ameotoko closed 2 years ago

ameotoko commented 2 years ago

This gives a Warning: Attempt to read property "id" on null, because $dc is null in frontend:

https://github.com/terminal42/contao-mailusername/blob/10e8026e5363cd78c95cee54018fb6bf168d1dad/src/EventListener/MailUsernameListener.php#L58-L62

Screenshot 2022-07-26 at 19 47 09

aschempp commented 2 years ago

fixed in 426aa78d23f36cf1d57c49a4f1c5cabb18171669