Merge pull request #26005 from nextcloud/techdept/psalm/fix_invalid_check

Fix invalid check after constructing DateTime
This commit is contained in:
Roeland Jago Douma 2021-03-08 19:38:31 +01:00 committed by GitHub
commit bf5d5c57a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 4 deletions

View File

@ -1455,10 +1455,6 @@ class ShareAPIController extends OCSController {
throw new \Exception('Invalid date. Format must be YYYY-MM-DD');
}
if ($date === false) {
throw new \Exception('Invalid date. Format must be YYYY-MM-DD');
}
$date->setTime(0, 0, 0);
return $date;