about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-07-22 15:39:36 +0200
committerGitHub <noreply@github.com>2020-07-22 15:39:36 +0200
commit4024952b58bacb94d2cb43fafddf0e97bea4c55c (patch)
treeb1c1e5cdb84606879d65ecceebe4cf665332379b /lib
parent801e546ecc1efb4103232d8265229eb455a8dd5b (diff)
parentf8e315cd74d05a6878bbd018b20462daa0b5e660 (diff)
Merge pull request #1385 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'lib')
-rw-r--r--lib/paperclip/media_type_spoof_detector_extensions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/paperclip/media_type_spoof_detector_extensions.rb b/lib/paperclip/media_type_spoof_detector_extensions.rb
index 363934d8d..43337cc68 100644
--- a/lib/paperclip/media_type_spoof_detector_extensions.rb
+++ b/lib/paperclip/media_type_spoof_detector_extensions.rb
@@ -18,7 +18,7 @@ module Paperclip
       @type_from_mime_magic ||= begin
         begin
           File.open(@file.path) do |file|
-            MimeMagic.by_magic(file)&.type
+            MimeMagic.by_magic(file)&.type || ''
           end
         rescue Errno::ENOENT
           ''