]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 305771: Cannot create request flags with no requestee - Patch by Myk Melez <myk...
authorlpsolit%gmail.com <>
Fri, 26 Aug 2005 17:53:23 +0000 (17:53 +0000)
committerlpsolit%gmail.com <>
Fri, 26 Aug 2005 17:53:23 +0000 (17:53 +0000)
Bugzilla/Flag.pm

index 2b70cf2ca20677d1a55f47b85540f10786da3be3..f23c7ec7261fd62be565f184840930c169f1e4b1 100644 (file)
@@ -803,8 +803,9 @@ sub FormToNewFlags {
         my $status = $cgi->param("flag_type-$type_id");
         trick_taint($status);
 
-        if ($status eq "?") {
-            foreach my $login ($cgi->param("requestee_type-$type_id")) {
+        my @logins = $cgi->param("requestee_type-$type_id");
+        if ($status eq "?" && scalar(@logins) > 0) {
+            foreach my $login (@logins) {
                 my $requestee = new Bugzilla::User(login_to_id($login));
                 push (@flags, { type      => $flag_type ,
                                 target    => $target ,