Check the passed variables
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Родитель
cc948a3b3d
Коммит
ae2d802a0f
|
@ -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');
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче