summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-03-08 16:32:34 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2021-03-08 16:32:34 +0100
commit988b9f49c524c93c8232e082670fb57a367fbdc7 (patch)
tree0e5f78f55b38a6ebdcf82cbcf3767e3917237388
parenta63b709bedb0a48ded37eab4dad7ee4b3b652af2 (diff)
downloadnextcloud-server-988b9f49c524c93c8232e082670fb57a367fbdc7.tar.gz
nextcloud-server-988b9f49c524c93c8232e082670fb57a367fbdc7.zip
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>
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php4
1 files changed, 0 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index 12408d8e108..0a1ad84f816 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -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;