From: Matt Tyson Date: Tue, 28 Jul 2015 16:39:33 +0000 (+0200) Subject: Bug 1186700: Inserting data into the mail_staging table fails on PostgreSQL due to... X-Git-Tag: release-5.1.1~219 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12ca18325104618f3d66faf815e7b71e7b14b213;p=thirdparty%2Fbugzilla.git Bug 1186700: Inserting data into the mail_staging table fails on PostgreSQL due to unspecified BLOB type r=gerv a=sgreen --- diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm index 1931a2ff9c..69db9c5578 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; }