X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FArticles.pm;h=9bee84472bc1a1bc8937f1eec39722c9c48b4fca;hb=45d35d5739d05e602bc317739485693e0e9ff0b5;hp=47d0ebea2eb94c47cd09abba17f846a800472e0c;hpb=0bff2e665b3a6389b47510e4c04a5a454f6dd7d4;p=freeside.git diff --git a/rt/lib/RT/Articles.pm b/rt/lib/RT/Articles.pm index 47d0ebea2..9bee84472 100644 --- a/rt/lib/RT/Articles.pm +++ b/rt/lib/RT/Articles.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -597,7 +597,11 @@ sub Search { require Time::ParseDate; foreach my $date (qw(Created< Created> LastUpdated< LastUpdated>)) { next unless ( $args{$date} ); - my $seconds = Time::ParseDate::parsedate( $args{$date}, FUZZY => 1, PREFER_PAST => 1 ); + my ($seconds, $error) = Time::ParseDate::parsedate( $args{$date}, FUZZY => 1, PREFER_PAST => 1 ); + unless ( defined $seconds ) { + $RT::Logger->warning( + "Couldn't parse date '$args{$date}' by Time::ParseDate" ); + } my $date_obj = RT::Date->new( $self->CurrentUser ); $date_obj->Set( Format => 'unix', Value => $seconds ); $dates->{$date} = $date_obj;