diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-09 11:29:25 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-09 11:29:25 +0100 |
commit | eb14c9dc1e2366857cb9c00551daa49c6d3f15b9 (patch) | |
tree | c1d9cbeb1d8da31fdb3e778e00e873530d8e27ab /lib/private/preview.php | |
parent | 74e7fb14384f57199ac5a97e9338c0ffce77553d (diff) | |
parent | 61da3d530d489525fc0a6dd9575dc9ab37f1bc44 (diff) | |
download | nextcloud-server-eb14c9dc1e2366857cb9c00551daa49c6d3f15b9.tar.gz nextcloud-server-eb14c9dc1e2366857cb9c00551daa49c6d3f15b9.zip |
Merge pull request #21056 from owncloud/check-return
Verify return type
Diffstat (limited to 'lib/private/preview.php')
-rw-r--r-- | lib/private/preview.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php index b2accdfd00f..38c043030fc 100644 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -1250,7 +1250,7 @@ class Preview { * @param array $args * @param string $prefix */ - public static function prepare_delete($args, $prefix = '') { + public static function prepare_delete(array $args, $prefix = '') { $path = $args['path']; if (substr($path, 0, 1) === '/') { $path = substr($path, 1); @@ -1259,7 +1259,11 @@ class Preview { $view = new \OC\Files\View('/' . \OC_User::getUser() . '/' . $prefix); $absPath = Files\Filesystem::normalizePath($view->getAbsolutePath($path)); - self::addPathToDeleteFileMapper($absPath, $view->getFileInfo($path)); + $fileInfo = $view->getFileInfo($path); + if($fileInfo === false) { + return; + } + self::addPathToDeleteFileMapper($absPath, $fileInfo); if ($view->is_dir($path)) { $children = self::getAllChildren($view, $path); self::$deleteChildrenMapper[$absPath] = $children; |