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:
parent
a63b709bed
commit
988b9f49c5
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue