diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-01-09 17:46:14 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-01-09 17:46:14 +0100 |
commit | f65cf498f474e8e3206237da8e90bd5819aefc84 (patch) | |
tree | a934d8e9dff182b44e84ef37e99d953dd3ecee49 /apps/files/ajax | |
parent | b1031c63557cdf93601b2749611e14ab3c77c28e (diff) | |
download | nextcloud-server-f65cf498f474e8e3206237da8e90bd5819aefc84.tar.gz nextcloud-server-f65cf498f474e8e3206237da8e90bd5819aefc84.zip |
Check for existence of $_GET keys
Otherwise PHP errors are thrown in the error log.
Diffstat (limited to 'apps/files/ajax')
-rw-r--r-- | apps/files/ajax/rename.php | 10 |
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']]); } |