]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Let's not risk mixing two object types up
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 25 Jan 2015 01:24:41 +0000 (02:24 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 25 Jan 2015 01:24:41 +0000 (02:24 +0100)
actions/attachment_thumbnail.php

index b71ea6c801ce4c488c705d5cc630afb36e549653..484e5f00f273853e393da06ae6390f152c5ae80f 100644 (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());
     }
 }