From 3323461600041b1b4f420cb8487637067bc2a5fc Mon Sep 17 00:00:00 2001 From: Aaron Trevena Date: Tue, 11 Oct 2005 18:37:23 +0000 Subject: [PATCH] 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 --- lib/Maypole/Model/CDBI.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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}; -- 2.39.5