Let's not risk mixing two object types up

This commit is contained in:
Mikael Nordfeldth 2015-01-25 02:24:41 +01:00
parent aeaee388bf
commit ce8389443b

View File

@ -61,9 +61,9 @@ class Attachment_thumbnailAction extends AttachmentAction
try {
$thumbnail = $this->attachment->getThumbnail($this->thumb_w, $this->thumb_h, $this->thumb_c);
} catch (UseFileAsThumbnailException $e) {
// Since we're only using the ->getUrl() function, we can use the File object
$thumbnail = $e->file;
common_redirect($e->file->getUrl());
}
common_redirect($thumbnail->getUrl());
}
}