[Pkg-owncloud-commits] [owncloud] 41/69: check if we have a fileinfo

David Prévot taffit at moszumanska.debian.org
Sat May 10 16:20:37 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 799d8ca381b95e3f6cc47aa5f42d73c3a4fbda92
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date:   Wed May 7 11:47:52 2014 +0200

    check if we have a fileinfo
---
 apps/files_sharing/lib/helper.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php
index cc1f7d9..c734753 100644
--- a/apps/files_sharing/lib/helper.php
+++ b/apps/files_sharing/lib/helper.php
@@ -127,7 +127,11 @@ class Helper {
 		$ids = array();
 		while ($path !== '' && $path !== '.' && $path !== '/') {
 			$info = $ownerView->getFileInfo($path);
-			$ids[] = $info['fileid'];
+			if ($info instanceof \OC\Files\FileInfo) {
+				$ids[] = $info['fileid'];
+			} else {
+				\OCP\Util::writeLog('sharing', 'No fileinfo available for: ' . $path, \OCP\Util::WARN);
+			}
 			$path = dirname($path);
 		}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list