summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User/Setting.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/User/Setting.pm')
-rw-r--r--Bugzilla/User/Setting.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/Bugzilla/User/Setting.pm b/Bugzilla/User/Setting.pm
index 6387883c6..f13bfe972 100644
--- a/Bugzilla/User/Setting.pm
+++ b/Bugzilla/User/Setting.pm
@@ -233,9 +233,8 @@ sub set_default {
sub _setting_exists {
my ($setting_name) = @_;
my $dbh = Bugzilla->dbh;
- my $sth = $dbh->prepare("SELECT name FROM setting WHERE name = ?");
- $sth->execute($setting_name);
- return ($sth->rows) ? 1 : 0;
+ return $dbh->selectrow_arrayref(
+ "SELECT 1 FROM setting WHERE name = ?", undef, $setting_name) || 0;
}