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

Jifty commits jifty-commit at lists.jifty.org
Mon Mar 2 19:58:35 EST 2009


Author: alexmv
Date: Mon Mar  2 19:58:35 2009
New Revision: 6536

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

Log:
 r42841 at kohr-ah:  chmrr | 2009-03-02 19:57:16 -0500
 5.10 gets picky about lc called with undef, like render_as sometimes is.  Better warning-proofing


Modified: jifty/trunk/lib/Jifty/Action/Record/Search.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action/Record/Search.pm	(original)
+++ jifty/trunk/lib/Jifty/Action/Record/Search.pm	Mon Mar  2 19:58:35 2009
@@ -76,7 +76,7 @@
             $info->{valid_values} = $valid_values = (eval { [ @$valid_values ] } || [$valid_values]);
 
             # For radio display, display an "any" label (empty looks weird)
-            if (lc $info->{render_as} eq 'radio') {
+            if (defined $info->{render_as} and lc $info->{render_as} eq 'radio') {
                 if (@$valid_values > 1) {
                     unshift @$valid_values, { display => _("(any)"), value => '' };
                     $info->{default_value} ||= '';
@@ -94,7 +94,7 @@
         }
 
         # You can't search passwords, so remove the fields
-        if(lc $info->{'render_as'} eq 'password') {
+        if(defined $info->{'render_as'} and lc $info->{'render_as'} eq 'password') {
             delete $args->{$field};
             next;
         }


More information about the Jifty-commit mailing list