Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-11-16 18:31:39 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-12-20 09:38:45 +0300
commitae2d802a0fba50dcaf85ea8466d02b79f0dd4aa6 (patch)
treefd2596fac0a7160e5f422cf2c888c1f91a5e0105 /lib
parentcc948a3b3dd945ed2fcfa9bcfd1b072a51b95a50 (diff)
Check the passed variables
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/OCSController.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Controller/OCSController.php b/lib/Controller/OCSController.php
index f747986e..cbb93c73 100644
--- a/lib/Controller/OCSController.php
+++ b/lib/Controller/OCSController.php
@@ -138,6 +138,10 @@ class OCSController extends \OCP\AppFramework\OCSController {
* @param int $template The template id
*/
public function createFromTemplate($path, $template) {
+ if ($path === null || $template === null) {
+ throw new OCSBadRequestException('path and template must be set');
+ }
+
if (!$this->manager->isTemplate($template)) {
throw new OCSBadRequestException('Invalid template provided');
}