forked from GNUsocial/gnu-social
Let's not risk mixing two object types up
This commit is contained in:
parent
aeaee388bf
commit
ce8389443b
@ -61,9 +61,9 @@ class Attachment_thumbnailAction extends AttachmentAction
|
|||||||
try {
|
try {
|
||||||
$thumbnail = $this->attachment->getThumbnail($this->thumb_w, $this->thumb_h, $this->thumb_c);
|
$thumbnail = $this->attachment->getThumbnail($this->thumb_w, $this->thumb_h, $this->thumb_c);
|
||||||
} catch (UseFileAsThumbnailException $e) {
|
} catch (UseFileAsThumbnailException $e) {
|
||||||
// Since we're only using the ->getUrl() function, we can use the File object
|
common_redirect($e->file->getUrl());
|
||||||
$thumbnail = $e->file;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
common_redirect($thumbnail->getUrl());
|
common_redirect($thumbnail->getUrl());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user