]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 687247: Bugzilla crashes when creating a new flagtype on PostgreSQL
authorFrédéric Buclin <LpSolit@gmail.com>
Sun, 18 Sep 2011 17:23:26 +0000 (19:23 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Sun, 18 Sep 2011 17:23:26 +0000 (19:23 +0200)
a=LpSolit

Bugzilla/FlagType.pm

index 7f37dd884218e5c16c70f848c5f8f1908b1c9f06..ea81dfe467f1abd2816143ae49e859e5910adeca 100644 (file)
@@ -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};