]> git.decadent.org.uk Git - maypole.git/commitdiff
fixed undef warnings
authorAaron Trevena <aaron.trevena@gmail.com>
Sun, 26 Oct 2008 20:43:57 +0000 (20:43 +0000)
committerAaron Trevena <aaron.trevena@gmail.com>
Sun, 26 Oct 2008 20:43:57 +0000 (20:43 +0000)
git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@595 48953598-375a-da11-a14b-00016c27c3ee

lib/Maypole/Model/CDBI/AsForm.pm

index d76ecb42da5bcca50de5497b3231e169d54f2fad..8a7f06c95e3f8237aad4d82009b0eba928353060 100644 (file)
@@ -880,9 +880,9 @@ sub _to_bool_select {
     unless (defined $selected);
 
   my $a = HTML::Element->new("select", name => $col);
     unless (defined $selected);
 
   my $a = HTML::Element->new("select", name => $col);
-  if ($args->{column_nullable} || $args->{value} eq '') {
+  if ($args->{column_nullable} || !defined $args->{value} ) {
     my $null =  HTML::Element->new("option");
     my $null =  HTML::Element->new("option");
-    $null->attr('selected', 'selected') if  $args->{value} eq '';
+    $null->attr('selected', 'selected') if  (!defined $args->{value});
     $a->push_content( $null ); 
   }
 
     $a->push_content( $null ); 
   }