Sommerregen / grav-plugin-mediaembed

This plugin embeds several media sites (e.g. YouTube, Vimeo, Soundcloud) by only providing the URL to the medium.
Other
24 stars 8 forks source link

Prevent potential division by zero error #2

Closed w00fz closed 9 years ago

w00fz commented 9 years ago

When later on in the code there is a width / height division, it can potentially fail by Division By Zero if these haven't been defined or are actually set to 0. Fix prevents that.

Sommerregen commented 9 years ago

Thanks! I will merge this into the branch as soon as I solved the another issue with MediaEmbed on getgrav.org/forum . Until then I will keep it open as a gentle reminder for me.