From ce8389443bb1b857afe8c05657a951f3916092a9 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sun, 25 Jan 2015 02:24:41 +0100 Subject: [PATCH] Let's not risk mixing two object types up --- actions/attachment_thumbnail.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/attachment_thumbnail.php b/actions/attachment_thumbnail.php index b71ea6c801..484e5f00f2 100644 --- a/actions/attachment_thumbnail.php +++ b/actions/attachment_thumbnail.php @@ -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()); } } -- 2.39.5