Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
8073ec46
Commit
8073ec46
authored
Oct 26, 2010
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 607361: Creating an attachment without a "comment" param in the URL causes an internal error
a=LpSolit
parent
549d83c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
attachment.cgi
attachment.cgi
+2
-1
No files found.
attachment.cgi
View file @
8073ec46
...
...
@@ -504,6 +504,7 @@ sub insert {
# Insert a comment about the new attachment into the database.
my
$comment
=
$cgi
->
param
(
'comment'
);
$comment
=
''
unless
defined
$comment
;
$bug
->
add_comment
(
$comment
,
{
isprivate
=>
$attachment
->
isprivate
,
type
=>
CMT_ATTACHMENT_CREATED
,
extra_data
=>
$attachment
->
id
});
...
...
@@ -639,7 +640,7 @@ sub update {
# If the user submitted a comment while editing the attachment,
# add the comment to the bug. Do this after having validated isprivate!
my
$comment
=
$cgi
->
param
(
'comment'
);
if
(
trim
(
$comment
)
)
{
if
(
defined
$comment
&&
trim
(
$comment
)
ne
''
)
{
$bug
->
add_comment
(
$comment
,
{
isprivate
=>
$attachment
->
isprivate
,
type
=>
CMT_ATTACHMENT_UPDATED
,
extra_data
=>
$attachment
->
id
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment