From: Mikael Nordfeldth Date: Sun, 25 Jan 2015 01:24:41 +0000 (+0100) Subject: Let's not risk mixing two object types up X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ce8389443bb1b857afe8c05657a951f3916092a9;p=quix0rs-gnu-social.git Let's not risk mixing two object types up --- 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()); } }