diff options
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Attachment.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index fe1b781c9..6a798d046 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -749,7 +749,10 @@ sub insert_attachment_for_bug { unless ($cgi->param('ispatch')) { $class->validate_content_type($throw_error) || return 0; } - $data = _validate_data($throw_error, $hr_vars) || return 0; + $data = _validate_data($throw_error, $hr_vars); + # If the attachment is stored locally, $data eq ''. + # If an error is thrown, $data eq '0'. + ($data ne '0') || return 0; $contenttype = $cgi->param('contenttype'); # These are inserted using placeholders so no need to panic |