[Rt-commit] r9060 - rt/branches/3.7-EXPERIMENTAL/lib/RT

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sat Sep 15 02:55:21 EDT 2007


Author: sunnavy
Date: Sat Sep 15 02:55:19 2007
New Revision: 9060

Modified:
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Date.pm

Log:
check whether they are numbers before numerical comparing.

Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Date.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Date.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Date.pm	Sat Sep 15 02:55:19 2007
@@ -273,7 +273,7 @@
     if ( UNIVERSAL::isa( $other, 'RT::Date' ) ) {
         $other = $other->Unix;
     }
-    return undef unless $other > 0;
+    return undef unless $other=~ /^\d+$/ && $other > 0;
 
     my $unix = $self->Unix;
     return undef unless $unix > 0;


More information about the Rt-commit mailing list