Refix the thumbnail url problem with Storage so that it throws an error when no filename is passed.
This commit is contained in:
parent
498b961ed7
commit
5854e95130
1 changed files with 3 additions and 3 deletions
|
|
@ -1246,13 +1246,13 @@ The file to retrieve the thumbnail for.
|
|||
sub getThumbnailUrl {
|
||||
my $self = shift;
|
||||
my $filename = shift;
|
||||
if (! $self->isImage($filename)) {
|
||||
return '';
|
||||
}
|
||||
if (! defined $filename) {
|
||||
$self->session->errorHandler->error("Can't find a thumbnail url without a filename.");
|
||||
return '';
|
||||
}
|
||||
if (! $self->isImage($filename)) {
|
||||
return '';
|
||||
}
|
||||
my $thumbname = 'thumb-' . $filename;
|
||||
if (! -e $self->getPath($thumbname)) {
|
||||
$self->session->errorHandler->error("Can't find a thumbnail for a file named '$filename' that is not in my storage location.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue