aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption/lib')
-rw-r--r--apps/files_encryption/lib/proxy.php6
-rw-r--r--apps/files_encryption/lib/stream.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index 11048005969..2ea477a6e4d 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -283,7 +283,7 @@ class Proxy extends \OC_FileProxy {
public function postGetFileInfo($path, $data) {
// if path is a folder do nothing
- if (\OCP\App::isEnabled('files_encryption') && is_array($data) && array_key_exists('size', $data)) {
+ if (\OCP\App::isEnabled('files_encryption') && $data !== false && array_key_exists('size', $data)) {
// Disable encryption proxy to prevent recursive calls
$proxyStatus = \OC_FileProxy::$enabled;
@@ -341,7 +341,7 @@ class Proxy extends \OC_FileProxy {
}
// if file is encrypted return real file size
- if (is_array($fileInfo) && $fileInfo['encrypted'] === true) {
+ if ($fileInfo && $fileInfo['encrypted'] === true) {
// try to fix unencrypted file size if it doesn't look plausible
if ((int)$fileInfo['size'] > 0 && (int)$fileInfo['unencrypted_size'] === 0 ) {
$fixSize = $util->getFileSize($path);
@@ -354,7 +354,7 @@ class Proxy extends \OC_FileProxy {
$size = $fileInfo['unencrypted_size'];
} else {
// self healing if file was removed from file cache
- if (!is_array($fileInfo)) {
+ if (!$fileInfo) {
$fileInfo = array();
}
diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php
index b3bf34ddb82..88eacc6f136 100644
--- a/apps/files_encryption/lib/stream.php
+++ b/apps/files_encryption/lib/stream.php
@@ -567,7 +567,7 @@ class Stream {
// get file info
$fileInfo = $this->rootView->getFileInfo($path);
- if (is_array($fileInfo)) {
+ if ($fileInfo) {
// set encryption data
$fileInfo['encrypted'] = true;
$fileInfo['size'] = $this->size;