From: Rafael Kitover Date: Wed, 19 Oct 2011 20:58:43 +0000 (-0400) Subject: fix uninitialized warnings for Firebird X-Git-Tag: 0.07011~28 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4a01c33f6602206d763851bcd795561499baa6e6;p=dbsrgits%2FDBIx-Class-Schema-Loader.git fix uninitialized warnings for Firebird Check if the character_set_id for a column is NULL before comparing it to a value to fix uninitialized warnings in the tests. --- diff --git a/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm b/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm index 122c41e..d761e04 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm @@ -226,7 +226,7 @@ EOF $info->{data_type} = 'blob'; } elsif ($sub_type_name eq 'TEXT') { - if ($char_set_id == 3) { + if (defined $char_set_id && $char_set_id == 3) { $info->{data_type} = 'blob sub_type text character set unicode_fss'; } else { @@ -275,7 +275,7 @@ EOF if ($data_type =~ /^(?:char|varchar)\z/) { $info->{size} = $char_length; - if ($char_set_id == 3) { + if (defined $char_set_id && $char_set_id == 3) { $info->{data_type} .= '(x) character set unicode_fss'; } }