From: Frédéric Buclin Date: Sun, 18 Sep 2011 17:23:26 +0000 (+0200) Subject: Bug 687247: Bugzilla crashes when creating a new flagtype on PostgreSQL X-Git-Tag: bugzilla-4.2rc1~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6debb2e12f69b687737678deace99b77c705587b;p=thirdparty%2Fbugzilla.git Bug 687247: Bugzilla crashes when creating a new flagtype on PostgreSQL a=LpSolit --- diff --git a/Bugzilla/FlagType.pm b/Bugzilla/FlagType.pm index 7f37dd8842..ea81dfe467 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};