verbb / craft-videoembedder

MIT License
17 stars 14 forks source link

Exception with invalid entries #12

Open woutsluiter opened 5 years ago

woutsluiter commented 5 years ago

Hello! I have the following issue: I'm able to save invalid urls, which causes exceptions in the admin and frontend, even without devMode. It results in being unable to even change the value afterwards because of the exception. I have to dig in the database itself. I would expect to get a warning when trying to save an invalid value, or get a null / undefined value in the template or something.

PS: I'm not that great with php/backend, otherwise I would've created a PR myself. Great plugin though!

mikestecker commented 5 years ago

Hmm ok. I'm honestly not great with PHP myself either. This was just created out of necessity. I'll try and find some time to look into how to add checks before the entry is saved to ensure a valid URL.