[Rt-commit] r12830 - in rt/branches/3.8-TESTING: share/html/Elements

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Jun 3 11:13:00 EDT 2008


Author: sunnavy
Date: Tue Jun  3 11:12:53 2008
New Revision: 12830

Modified:
   rt/branches/3.8-TESTING/lib/RT/CustomField_Overlay.pm
   rt/branches/3.8-TESTING/share/html/Elements/ValidateCustomFields

Log:
fixed '0 is an invalid digest' when validating cf values

Modified: rt/branches/3.8-TESTING/lib/RT/CustomField_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/CustomField_Overlay.pm	(original)
+++ rt/branches/3.8-TESTING/lib/RT/CustomField_Overlay.pm	Tue Jun  3 11:12:53 2008
@@ -978,7 +978,7 @@
     my $self = shift;
     my $regex = $self->Pattern or return 1;
 
-    return (($_[0] || '') =~ $regex);
+    return (( defined $_[0] ? $_[0] : '') =~ $regex);
 }
 
 

Modified: rt/branches/3.8-TESTING/share/html/Elements/ValidateCustomFields
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Elements/ValidateCustomFields	(original)
+++ rt/branches/3.8-TESTING/share/html/Elements/ValidateCustomFields	Tue Jun  3 11:12:53 2008
@@ -69,7 +69,7 @@
     } elsif ( $CF->Type =~ /text/i ) {
         @values = ($value);
     } else {
-        @values = split /\r*\n/, ($value||'');
+        @values = split /\r*\n/, ( defined $value ? $value : '');
     }
     @values = grep $_ ne '',
         map {


More information about the Rt-commit mailing list