From: jocuri%softhome.net <> Date: Sun, 9 Jan 2005 02:14:36 +0000 (+0000) Subject: Patch for bug 240250: Shouldn't receive an unfriendly error when editing groupset... X-Git-Tag: bugzilla-2.18~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2c01404b88e7b92c582ddd34f585c589fd68fc8;p=thirdparty%2Fbugzilla.git Patch for bug 240250: Shouldn't receive an unfriendly error when editing groupset for a product that doesn't exist; patch by Frédéric Buclin , r=mkanat, a=justdave. --- diff --git a/editproducts.cgi b/editproducts.cgi index 95f524cebf..8b80cb0d11 100755 --- a/editproducts.cgi +++ b/editproducts.cgi @@ -1277,6 +1277,8 @@ if ($action eq 'update') { if ($action eq 'editgroupcontrols') { my $product_id = get_product_id($product); + $product_id + || ThrowUserError("invalid_product_name", { product => $product }); # Display a group if it is either enabled or has bugs for this product. SendSQL("SELECT id, name, entry, membercontrol, othercontrol, canedit, " . "isactive, COUNT(bugs.bug_id) " .