]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed warning when browsing Shared folder
authorVincent Petry <pvince81@owncloud.com>
Mon, 10 Mar 2014 16:25:16 +0000 (17:25 +0100)
committerVincent Petry <pvince81@owncloud.com>
Fri, 21 Mar 2014 16:56:56 +0000 (17:56 +0100)
The virtual "Shared" folder doesn't have an unencrypted_size field.
This fix adds a check to prevent warnings in the log.

Backport of 022d76c from master

apps/files_encryption/lib/proxy.php

index 22b06da429c54d4c02407e3f3b656b46d3ace3b3..2daf5b29b2ec5598f9bea00e8f15c64e0421bdac 100644 (file)
@@ -343,7 +343,7 @@ class Proxy extends \OC_FileProxy {
                        \OC_FileProxy::$enabled = false;
                        $fileInfo = $view->getFileInfo($path);
                        \OC_FileProxy::$enabled = $proxyState;
-                       if ($fileInfo['unencrypted_size'] > 0) {
+                       if (isset($fileInfo['unencrypted_size']) && $fileInfo['unencrypted_size'] > 0) {
                                return $fileInfo['unencrypted_size'];
                        }
                        return $size;