Skip to content

Commit

Permalink
Item14212: fix "Use of uninitialized value $secondsSince1970..." warning
Browse files Browse the repository at this point in the history
  • Loading branch information
fschlich committed Nov 8, 2016
1 parent 3b14983 commit b8f44a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Foswiki/Plugins/DateTimePlugin.pm
Expand Up @@ -217,6 +217,8 @@ sub _formatDateTime {
# try to match long month names
$dateStr =~ s/($monthLongNamesReStr)/$fullMonth2IsoMonth{$1}/g;
$secondsSince1970 = Foswiki::Time::parseTime($dateStr);
# fallback if $dateStr couldn't be parsed
$secondsSince1970 = 0 unless defined $secondsSince1970;
}
}
else {
Expand Down

0 comments on commit b8f44a2

Please sign in to comment.