From: stekkel Date: Sat, 1 Mar 2003 22:28:20 +0000 (+0000) Subject: fix warning in case of undefined date X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=50457d45b5b6a83168b70aaad3835b28c2a8092e;p=squirrelmail.git 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 --- 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]))) {