소스 검색

fix warning in case of undefined date

stekkel 22 년 전
부모
커밋
9a7650588e
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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]))) {