Avoid perl warnings

This commit is contained in:
Jamie Cameron
2018-08-14 21:20:00 -07:00
parent d984acd134
commit 686e8f89da

View File

@@ -244,7 +244,7 @@ return undef;
sub number_to_weekday
{
return ucfirst($weekday_names[$_[0]]);
return defined($_[0]) ? ucfirst($weekday_names[$_[0]]) : undef;
}
# Returns 1 if this system supports setting the hardware clock.