]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/imagefile.php
Merge commit 'refs/merge-requests/41' of https://gitorious.org/social/mainline into...
[quix0rs-gnu-social.git] / lib / imagefile.php
index 6aeab35816e3b3ca399ecd0683fac93e3b1680a4..2dc260b1bf8cad511abe131d254ab4648db659d8 100644 (file)
@@ -110,6 +110,9 @@ class ImageFile
         $imgPath = null;
         $media = common_get_mime_media($file->mimetype);
         if (Event::handle('CreateFileImageThumbnailSource', array($file, &$imgPath, $media))) {
+            if (empty($file->filename)) {
+                throw new UnsupportedMediaException(_('File without filename could not get a thumbnail source.'));
+            }
             switch ($media) {
             case 'image':
                 $imgPath = $file->getPath();