Skip to content

Commit

Permalink
Refix the thumbnail url problem with Storage so that it throws an err…
Browse files Browse the repository at this point in the history
…or when no filename is passed.
  • Loading branch information
perlDreamer committed Feb 17, 2010
1 parent 7db6470 commit 25274c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/WebGUI/Storage.pm
Expand Up @@ -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.");
Expand Down

0 comments on commit 25274c5

Please sign in to comment.