summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-01-12 16:35:31 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-01-12 16:35:31 +0100
commit7a393abdbdf2acad73bbc37f7af501b90eac8d1b (patch)
treed90b0b8eb4b72db8ae2703e97f51b799c916887b
parent5f7c115dfee58db718d0887562a5a8df8ccc7279 (diff)
parentf65cf498f474e8e3206237da8e90bd5819aefc84 (diff)
downloadnextcloud-server-7a393abdbdf2acad73bbc37f7af501b90eac8d1b.tar.gz
nextcloud-server-7a393abdbdf2acad73bbc37f7af501b90eac8d1b.zip
Merge pull request #13210 from owncloud/use-isset
Check for existence of $_GET keys
-rw-r--r--apps/files/ajax/rename.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files/ajax/rename.php b/apps/files/ajax/rename.php
index 00c8a1e44db..6ea53468861 100644
--- a/apps/files/ajax/rename.php
+++ b/apps/files/ajax/rename.php
@@ -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']]);
}