Unnecessarily spammy logs for getThumbnail()

When trying to create thumbnails for remote media that don't have the
filename field set, we got a lot of output in the debug log.
This commit is contained in:
Mikael Nordfeldth 2015-01-26 01:16:28 +01:00
parent a8e613e508
commit 97812549b9

View File

@ -110,6 +110,9 @@ class ImageFile
$imgPath = null; $imgPath = null;
$media = common_get_mime_media($file->mimetype); $media = common_get_mime_media($file->mimetype);
if (Event::handle('CreateFileImageThumbnailSource', array($file, &$imgPath, $media))) { 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) { switch ($media) {
case 'image': case 'image':
$imgPath = $file->getPath(); $imgPath = $file->getPath();