Fix invalid check after constructing DateTime

We construct an object. Either that works on not.But the result can't be
false.

Found by psalm

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2021-03-08 16:32:34 +01:00
parent a63b709bed
commit 988b9f49c5
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;