Skip to content
Permalink
Browse files

Refix the thumbnail url problem with Storage so that it throws an err…

…or when no filename is passed.
  • Loading branch information...
perlDreamer committed Feb 17, 2010
1 parent 7db6470 commit 25274c5ba0fcb16dedd6296abded192e8b48407b
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/WebGUI/Storage.pm
@@ -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.");

0 comments on commit 25274c5

Please sign in to comment.
You can’t perform that action at this time.