Skip to content
Snippets Groups Projects
Commit 7a393abd authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #13210 from owncloud/use-isset

Check for existence of $_GET keys
parents 5f7c115d f65cf498
No related branches found
No related tags found
No related merge requests found
......@@ -30,13 +30,13 @@ $files = new \OCA\Files\App(
\OC::$server->getL10N('files')
);
$result = $files->rename(
$_GET["dir"],
$_GET["file"],
$_GET["newname"]
isset($_GET['dir']) ? $_GET['dir'] : '',
isset($_GET['file']) ? $_GET['file'] : '',
isset($_GET['newname']) ? $_GET['newname'] : ''
);
if($result['success'] === true){
OCP\JSON::success(array('data' => $result['data']));
OCP\JSON::success(['data' => $result['data']]);
} else {
OCP\JSON::error(array('data' => $result['data']));
OCP\JSON::error(['data' => $result['data']]);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment