[Jifty-commit] r6565 - in jifty/trunk: lib/Jifty/Action lib/Jifty/Action/Record

Jifty commits jifty-commit at lists.jifty.org
Fri Mar 6 23:10:36 EST 2009


Author: alexmv
Date: Fri Mar  6 23:10:36 2009
New Revision: 6565

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Action/Record.pm
   jifty/trunk/lib/Jifty/Action/Record/Update.pm

Log:
 r43053 at kohr-ah:  chmrr | 2009-03-06 23:10:11 -0500
  * Warnings avoidance for 5.11, which carps about lc(undef)


Modified: jifty/trunk/lib/Jifty/Action/Record.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action/Record.pm	(original)
+++ jifty/trunk/lib/Jifty/Action/Record.pm	Fri Mar  6 23:10:36 2009
@@ -378,7 +378,7 @@
 
     # Add a canonicalizer for the column if the record provides one
     if ( $self->record->has_canonicalizer_for_column($field) ) {
-        $do_ajax = 1 unless lc( $column->render_as ) eq 'checkbox';
+        $do_ajax = 1 unless defined $column->render_as and lc( $column->render_as ) eq 'checkbox';
         $method ||= sub {
             my ( $self, $value ) = @_;
             return $self->record->run_canonicalization_for_column(
@@ -389,7 +389,7 @@
     }
 
     # Otherwise, if it's a date, we have a built-in canonicalizer for that
-    elsif ( lc( $column->render_as ) eq 'date' ) {
+    elsif ( defined $column->render_as and lc( $column->render_as ) eq 'date' ) {
         $do_ajax = 1;
     }
     return ( $method, $do_ajax );

Modified: jifty/trunk/lib/Jifty/Action/Record/Update.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action/Record/Update.pm	(original)
+++ jifty/trunk/lib/Jifty/Action/Record/Update.pm	Fri Mar  6 23:10:36 2009
@@ -125,7 +125,8 @@
             and defined $value and $value eq '' );
 
         # Skip file uploads if blank
-        next if lc $self->arguments->{$field}{render_as} eq "upload"
+        next if defined $self->arguments->{$field}{render_as}
+          and lc $self->arguments->{$field}{render_as} eq "upload"
           and (not defined $value or not ref $value);
 
         # Handle file uploads


More information about the Jifty-commit mailing list