FIX: raise exception when getting dimensions of missing image

- follow-up on 0eacd45ab15cbd20ed9f444fd447886a7fc6dccb
This commit is contained in:
Penar Musaraj
2018-12-03 10:19:49 -05:00
parent 9125b5fbc4
commit f8e6a37858
4 changed files with 17 additions and 7 deletions

View File

@ -1,7 +1,7 @@
module ImageSizer
# Resize an image to the aspect ratio we want
def self.resize(width = nil, height = nil, opts = {})
def self.resize(width, height, opts = {})
return if width.blank? || height.blank?
max_width = (opts[:max_width] || SiteSetting.max_image_width).to_f