fix warning in case of undefined date
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 1 Mar 2003 22:28:20 +0000 (22:28 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 1 Mar 2003 22:28:20 +0000 (22:28 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4578 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/date.php

index 4b2fa8605ff3fe7c8634ab58d89289b600ecba34..24cb1deee28f6beafe2606f5770b4794d1c5dda3 100644 (file)
@@ -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]))) {