From 50457d45b5b6a83168b70aaad3835b28c2a8092e Mon Sep 17 00:00:00 2001 From: stekkel Date: Sat, 1 Mar 2003 22:28:20 +0000 Subject: [PATCH] fix warning in case of undefined date git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4578 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/date.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/date.php b/functions/date.php index 4b2fa860..24cb1dee 100644 --- a/functions/date.php +++ b/functions/date.php @@ -261,6 +261,9 @@ function getTimeStamp($dateParts) { * array is an integer or not. * Since the day of week is optional, this check is needed. */ + if (count($dateParts) <2) { + return 0; + } /* remove day of week */ if (!is_numeric(trim($dateParts[0]))) { -- 2.25.1