From 113615144655b980a9d333753e61d95e50838e72 Mon Sep 17 00:00:00 2001 From: "justdave%syndicomm.com" Date: Sat, 18 Aug 2001 01:49:02 +0000 Subject: [PATCH] Fix for bug 95857: process_bugs.cgi sees blank address in cc: line (would show up as __UNKNOWN__) Patch by Myk Melez r= justdave@syndicomm.com git-svn-id: svn://10.0.0.236/trunk@101390 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/process_bug.cgi | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mozilla/webtools/bugzilla/process_bug.cgi b/mozilla/webtools/bugzilla/process_bug.cgi index 76e52a2df9c..5bb180c5a3d 100755 --- a/mozilla/webtools/bugzilla/process_bug.cgi +++ b/mozilla/webtools/bugzilla/process_bug.cgi @@ -582,17 +582,15 @@ if (defined $::FORM{newcc} || defined $::FORM{removecc} || defined $::FORM{massc } if ($cc_add) { - foreach my $person (split(/[ ,]/, $cc_add)) { - # Ignore blanks - next unless $person; + $cc_add =~ s/^[\s,]+//; # Remove leading delimiters. + foreach my $person ( split(/[\s,]+/, $cc_add) ) { my $pid = DBNameToIdAndCheck($person); $cc_add{$pid} = $person; } } if ($cc_remove) { - foreach my $person (split(/[ ,]/, $cc_remove)) { - # Ignore blanks - next unless $person; + $cc_remove =~ s/^[\s,]+//; # Remove leading delimiters. + foreach my $person ( split(/[\s,]+/, $cc_remove) ) { my $pid = DBNameToIdAndCheck($person); $cc_remove{$pid} = $person; }