From abed40a3757cc5880938b581eaa8edcfe5686be3 Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" Date: Wed, 8 Sep 2004 22:53:39 +0000 Subject: [PATCH] Patch for bug 254729: fix editproducts.cgi generated warnings in the error log when creating new products; patch by GavinS ; r=vladd, a=justdave. git-svn-id: svn://10.0.0.236/trunk@161947 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/editproducts.cgi | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/mozilla/webtools/bugzilla/editproducts.cgi b/mozilla/webtools/bugzilla/editproducts.cgi index 873db1afc44..4098274d0f8 100755 --- a/mozilla/webtools/bugzilla/editproducts.cgi +++ b/mozilla/webtools/bugzilla/editproducts.cgi @@ -434,23 +434,25 @@ if ($action eq 'new') { my $existing_product = TestProduct($product); - # Check for exact case sensitive match: - if ($existing_product eq $product) { - print "The product '$product' already exists. Please press\n"; - print "Back and try again.\n"; - PutTrailer($localtrailer); - exit; - } + if ($existing_product) { - # Next check for a case-insensitive match: - if (lc($existing_product) eq lc($product)) { - print "The new product '$product' differs from existing product "; - print "'$existing_product' only in case. Please press\n"; - print "Back and try again.\n"; - PutTrailer($localtrailer); - exit; - } + # Check for exact case sensitive match: + if ($existing_product eq $product) { + print "The product '$product' already exists. Please press\n"; + print "Back and try again.\n"; + PutTrailer($localtrailer); + exit; + } + # Next check for a case-insensitive match: + if (lc($existing_product) eq lc($product)) { + print "The new product '$product' differs from existing product "; + print "'$existing_product' only in case. Please press\n"; + print "Back and try again.\n"; + PutTrailer($localtrailer); + exit; + } + } my $version = trim($::FORM{version} || '');