summaryrefslogtreecommitdiffstats
path: root/customfield.pl
diff options
context:
space:
mode:
Diffstat (limited to 'customfield.pl')
-rwxr-xr-xcustomfield.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/customfield.pl b/customfield.pl
index 2821425c7..033ac517a 100755
--- a/customfield.pl
+++ b/customfield.pl
@@ -75,7 +75,7 @@ $name =~ /^cf_/
or $name = "cf_" . $name;
# Exit gracefully if there is already a field with the given name.
-if (scalar(Bugzilla::Field::match({ name=>$name })) > 0) {
+if ( new Bugzilla::Field({name => $name}) ) {
print "There is already a field named $name. Please choose " .
"a different name.\n";
exit;