From: Matt S Trout Date: Fri, 16 Jun 2006 21:54:53 +0000 (+0000) Subject: fuckheaded failure to check defined before regexing X-Git-Tag: v0.07002~75^2~108 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d386b8dd0c01bb7eccc80964071d6da8500d4261;p=dbsrgits%2FDBIx-Class.git fuckheaded failure to check defined before regexing --- diff --git a/lib/DBIx/Class/InflateColumn/DateTime.pm b/lib/DBIx/Class/InflateColumn/DateTime.pm index f5feb95..969e50e 100644 --- a/lib/DBIx/Class/InflateColumn/DateTime.pm +++ b/lib/DBIx/Class/InflateColumn/DateTime.pm @@ -48,7 +48,7 @@ directly called by end users. sub register_column { my ($self, $column, $info, @rest) = @_; $self->next::method($column, $info, @rest); - if ($info->{data_type} =~ /^datetime$/i) { + if (defined($info->{data_type}) && $info->{data_type} =~ /^datetime$/i) { $self->inflate_column( $column => {