projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT 4.0.19
[freeside.git]
/
rt
/
lib
/
RT
/
Articles.pm
diff --git
a/rt/lib/RT/Articles.pm
b/rt/lib/RT/Articles.pm
index
d69eabf
..
9bee844
100644
(file)
--- a/
rt/lib/RT/Articles.pm
+++ b/
rt/lib/RT/Articles.pm
@@
-2,7
+2,7
@@
#
# COPYRIGHT:
#
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-201
3
Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-201
4
Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
# <sales@bestpractical.com>
#
# (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} );
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;
my $date_obj = RT::Date->new( $self->CurrentUser );
$date_obj->Set( Format => 'unix', Value => $seconds );
$dates->{$date} = $date_obj;