diff options
author | Matt Tyson <mtyson@redhat.com> | 2015-07-28 18:39:33 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2015-07-28 18:39:33 +0200 |
commit | 12ca18325104618f3d66faf815e7b71e7b14b213 (patch) | |
tree | c60db8889f11e214bb07d8418390a27bf5cd6028 | |
parent | 61a971cd65be2eaaa923af0f17a00159cc0e8222 (diff) | |
download | bugzilla-12ca18325104618f3d66faf815e7b71e7b14b213.tar.gz bugzilla-12ca18325104618f3d66faf815e7b71e7b14b213.tar.xz |
Bug 1186700: Inserting data into the mail_staging table fails on PostgreSQL due to unspecified BLOB type
r=gerv a=sgreen
-rw-r--r-- | Bugzilla/Mailer.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm index 1931a2ff9..69db9c557 100644 --- a/Bugzilla/Mailer.pm +++ b/Bugzilla/Mailer.pm @@ -122,7 +122,10 @@ sub MessageToMTA { # The e-mail string may contain tainted values. my $string = $email->as_string; trick_taint($string); - $dbh->do("INSERT INTO mail_staging (message) VALUES(?)", undef, $string); + + my $sth = $dbh->prepare("INSERT INTO mail_staging (message) VALUES (?)"); + $sth->bind_param(1, $string, $dbh->BLOB_TYPE); + $sth->execute; return; } |