summaryrefslogtreecommitdiffstats
path: root/apps/files/index.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-04-01 15:15:03 +0200
committerVincent Petry <pvince81@owncloud.com>2014-04-01 15:15:03 +0200
commit0bede65947d91d6ebb94bd12a98560ff21260758 (patch)
tree40f1cbd9424c95607c013a372a3c78b7ea94e031 /apps/files/index.php
parent27eff1ac30948fb3810efa0577ee729712a9652d (diff)
downloadnextcloud-server-0bede65947d91d6ebb94bd12a98560ff21260758.tar.gz
nextcloud-server-0bede65947d91d6ebb94bd12a98560ff21260758.zip
Fix dirInfo check when dir does not exist
Diffstat (limited to 'apps/files/index.php')
-rw-r--r--apps/files/index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/index.php b/apps/files/index.php
index 73601d26217..4d765b69e41 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -40,7 +40,7 @@ $dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : '';
$dir = \OC\Files\Filesystem::normalizePath($dir);
$dirInfo = \OC\Files\Filesystem::getFileInfo($dir);
// Redirect if directory does not exist
-if (!$dirInfo->getType() === 'dir') {
+if (!$dirInfo || !$dirInfo->getType() === 'dir') {
header('Location: ' . OCP\Util::getScriptName() . '');
exit();
}