summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Attachment.pm
diff options
context:
space:
mode:
authorDavid Lawrence <dlawrence@mozilla.com>2011-10-05 00:27:16 +0200
committerDavid Lawrence <dlawrence@mozilla.com>2011-10-05 00:27:16 +0200
commit8592e84f5d251a284f09fae2947101715e094a78 (patch)
treed40c32380d4253f38df2a50cc5b52b6f1e4cc4e4 /Bugzilla/Attachment.pm
parent57584dc4744fea59833ef355f7513690d246c70f (diff)
parent763a930131864bedd3155b668fcd8fd0fce2fefc (diff)
downloadbugzilla-8592e84f5d251a284f09fae2947101715e094a78.tar.gz
bugzilla-8592e84f5d251a284f09fae2947101715e094a78.tar.xz
merged with bugzilla/4.2
Diffstat (limited to 'Bugzilla/Attachment.pm')
-rw-r--r--Bugzilla/Attachment.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index a39dc3af4..3a8e7d5d5 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -565,7 +565,14 @@ sub _check_filename {
my ($invocant, $filename) = @_;
$filename = clean_text($filename);
- $filename || ThrowUserError('file_not_specified');
+ if (!$filename) {
+ if (ref $invocant) {
+ ThrowUserError('filename_not_specified');
+ }
+ else {
+ ThrowUserError('file_not_specified');
+ }
+ }
# Remove path info (if any) from the file name. The browser should do this
# for us, but some are buggy. This may not work on Mac file names and could