From 5854e951303b4229950f9ae882c6002f9a3cb8e3 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 16 Feb 2010 16:06:59 -0800 Subject: [PATCH] Refix the thumbnail url problem with Storage so that it throws an error when no filename is passed. --- lib/WebGUI/Storage.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/WebGUI/Storage.pm b/lib/WebGUI/Storage.pm index 4c3f7a078..3303228ed 100644 --- a/lib/WebGUI/Storage.pm +++ b/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.");