summaryrefslogtreecommitdiffstats
path: root/editproducts.cgi
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2004-09-09 07:53:39 +0200
committerjocuri%softhome.net <>2004-09-09 07:53:39 +0200
commit57c78bf9f0482116464226fac37ba0adf6ff4b13 (patch)
treea30a2a4fec7faaf14dbdb136049cb2f347f39385 /editproducts.cgi
parent8065d3b2d560911f953e49181c49cc407461c645 (diff)
downloadbugzilla-57c78bf9f0482116464226fac37ba0adf6ff4b13.tar.gz
bugzilla-57c78bf9f0482116464226fac37ba0adf6ff4b13.tar.xz
Patch for bug 254729: fix editproducts.cgi generated warnings in the error log when creating new products; patch by GavinS <bugzilla@chimpychompy.org>; r=vladd, a=justdave.
Diffstat (limited to 'editproducts.cgi')
-rwxr-xr-xeditproducts.cgi32
1 files changed, 17 insertions, 15 deletions
diff --git a/editproducts.cgi b/editproducts.cgi
index 873db1afc..4098274d0 100755
--- a/editproducts.cgi
+++ b/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 "<b>Back</b> 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 "<b>Back</b> 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 "<b>Back</b> 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 "<b>Back</b> and try again.\n";
+ PutTrailer($localtrailer);
+ exit;
+ }
+ }
my $version = trim($::FORM{version} || '');