summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2011-09-18 19:23:26 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2011-09-18 19:23:26 +0200
commit6debb2e12f69b687737678deace99b77c705587b (patch)
tree9ab05030f68190978d6c662e409e6935ae4471f7 /Bugzilla
parentf323db91093f6620fc7cfc8fb65b031ced40b028 (diff)
downloadbugzilla-6debb2e12f69b687737678deace99b77c705587b.tar.gz
bugzilla-6debb2e12f69b687737678deace99b77c705587b.tar.xz
Bug 687247: Bugzilla crashes when creating a new flagtype on PostgreSQL
a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/FlagType.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/Bugzilla/FlagType.pm b/Bugzilla/FlagType.pm
index 7f37dd884..ea81dfe46 100644
--- a/Bugzilla/FlagType.pm
+++ b/Bugzilla/FlagType.pm
@@ -118,6 +118,8 @@ sub create {
$class->check_required_create_fields(@_);
my $params = $class->run_create_validators(@_);
+ # In the DB, only the first character of the target type is stored.
+ $params->{target_type} = substr($params->{target_type}, 0, 1);
# Extract everything which is not a valid column name.
$params->{grant_group_id} = delete $params->{grant_group};