From 71ec65840cffab84666875ee8de6cb0cdca3a3a8 Mon Sep 17 00:00:00 2001 From: dms Date: Wed, 31 Jan 2001 13:26:38 +0000 Subject: [PATCH] check if $age is NULL in &isStale() git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@285 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/Misc.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Misc.pl b/src/Misc.pl index fe89197..22cd0ea 100644 --- a/src/Misc.pl +++ b/src/Misc.pl @@ -427,6 +427,11 @@ sub IsHostMatch { sub isStale { my ($file, $age) = @_; + if (!defined $age) { + &WARN("isStale: age == NULL."); + return 1; + } + return 1 unless ( -f $file); return 1 if (time() - (stat($file))[9] > $age*60*60*24); my $delta = time() - (stat($file))[9]; -- 2.39.5