# HG changeset patch # User Vincent Tondellier # Date 1455477435 -3600 # Node ID fcf3a68002e67491d075236d5e66e34705deb2e5 # Parent c5fcb00c7261dd7000689672331eaf226408514b Use start time when crash time is not defined (fix warnings) diff -r c5fcb00c7261 -r fcf3a68002e6 lib/CrashTest/Plugin/Storage/Sql/Model/CrashReport.pm --- a/lib/CrashTest/Plugin/Storage/Sql/Model/CrashReport.pm Sun Feb 14 20:15:25 2016 +0100 +++ b/lib/CrashTest/Plugin/Storage/Sql/Model/CrashReport.pm Sun Feb 14 20:17:15 2016 +0100 @@ -114,7 +114,7 @@ } sub create { - my ($self, $uuid, $pjson, $client_info, $dmp_content) = @_; + my ($self, $uuid, $pjson, $client_info, $dmp_file) = @_; if(!defined($client_info->{UserID})) { $self->app->log->info("Invalid crash $uuid: no UserID"); @@ -129,6 +129,10 @@ } if($client_info->{CrashTime}) { $crash_time = DateTime->from_epoch(epoch => $client_info->{CrashTime}); + } elsif($start_time) { + $crash_time = $start_time; + } else { + $crash_time = DateTime->from_epoch(epoch => time()); } chomp($client_info->{ProductName});