Commit e79713b2 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 373bb475
......@@ -3187,8 +3187,6 @@ sub cc {
ORDER BY profiles.login_name},
undef, $self->bug_id);
$self->{'cc'} = undef if !scalar(@{$self->{'cc'}});
return $self->{'cc'};
}
......
......@@ -877,7 +877,7 @@ sub _bug_to_hash {
$item{'blocks'} = \@blocks;
}
if (filter_wants $params, 'cc') {
my @cc = map { $self->type('string', $_) } @{ $bug->cc || [] };
my @cc = map { $self->type('string', $_) } @{ $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