diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 52ec433b0..02a164b38 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -665,7 +665,7 @@ class SeedDMS_Core_DMS { * If the parameter $date is a negative number or a date in the past, then * all documents from the start of that date till the end of the current * day will be returned. If $date is a positive integer or $date is a - * date in the future, the all documents from the start of the current + * date in the future, then all documents from the start of the current * day till the end of the day of the given date will be returned. * Passing 0 or the * current date in $date, will return all documents expiring the current @@ -692,7 +692,9 @@ class SeedDMS_Core_DMS { } elseif(is_string($date)) { $tmp = explode('-', $date, 3); if(count($tmp) != 3) - return false; + return false; + if(!self::checkDate($date, 'Y-m-d')) + return false; $ts = mktime(0, 0, 0, $tmp[1], $tmp[2], $tmp[0]); } else return false;