Browse Source

fix warning in case of undefined date

stekkel 22 years ago
parent
commit
9a7650588e
1 changed files with 3 additions and 0 deletions
  1. 3 0
      functions/date.php

+ 3 - 0
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]))) {