Commit 3272176a authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 819330: Bugzilla crashes when cloning a bug if the CC list is empty

r=dkl a=LpSolit
parent 387608ca
......@@ -3199,8 +3199,6 @@ sub cc {
ORDER BY profiles.login_name},
undef, $self->bug_id);
$self->{'cc'} = undef if !scalar(@{$self->{'cc'}});
return $self->{'cc'};
}
......
......@@ -882,7 +882,7 @@ sub _bug_to_hash {
$item{'blocks'} = \@blocks;
}
if (filter_wants $params, 'cc') {
my @cc = map { $self->type('email', $_) } @{ $bug->cc || [] };
my @cc = map { $self->type('email', $_) } @{ $bug->cc };
$item{'cc'} = \@cc;
}
if (filter_wants $params, 'creator') {
......
......@@ -208,7 +208,7 @@ if ($cloned_bug_id) {
$vars->{'deadline'} = $cloned_bug->deadline;
$vars->{'estimated_time'} = $cloned_bug->estimated_time;
if (defined $cloned_bug->cc) {
if (scalar @{$cloned_bug->cc}) {
$vars->{'cc'} = join (", ", @{$cloned_bug->cc});
} else {
$vars->{'cc'} = formvalue('cc');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment