From: Aaron Trevena Date: Tue, 11 Oct 2005 18:37:23 +0000 (+0000) Subject: fix for http://rt.cpan.org/Ticket/Display.html?id=14566 X-Git-Tag: 2.11~127 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=3323461600041b1b4f420cb8487637067bc2a5fc;p=maypole.git fix for http://rt.cpan.org/Ticket/Display.html?id=14566 git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@391 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/lib/Maypole/Model/CDBI.pm b/lib/Maypole/Model/CDBI.pm index d99eb50..c80a290 100644 --- a/lib/Maypole/Model/CDBI.pm +++ b/lib/Maypole/Model/CDBI.pm @@ -1,6 +1,10 @@ package Maypole::Model::CDBI; use base qw(Maypole::Model::Base Class::DBI); use Class::DBI::AsForm; +# use Maypole::Form::CDBI; +use CGI::Untaint; +# use Maypole::Form; + use Class::DBI::FromCGI; use Class::DBI::Loader; use Class::DBI::AbstractSearch; @@ -8,7 +12,7 @@ use Class::DBI::Plugin::RetrieveAll; use Class::DBI::Pager; use Lingua::EN::Inflect::Number qw(to_PL); -use CGI::Untaint; + use strict; =head1 NAME @@ -87,7 +91,7 @@ sub related_class { $self->meta_info( has_a => $accessor ) || return; - my $mapping = $related->{args}->{mapping}; + my $mapping = $related->{args}->{mapping} || []; if ( @$mapping ) { return $related->{foreign_class}->meta_info('has_a')->{ $$mapping[0] } ->{foreign_class};