Don't use is_array on FileInfo
This commit is contained in:
parent
c01949ec0e
commit
ec7c339930
|
@ -117,7 +117,7 @@ class Proxy extends \OC_FileProxy {
|
|||
// update file cache for target file
|
||||
$tmpFileInfo = $view->getFileInfo($tmpPath);
|
||||
$fileInfo = $view->getFileInfo($path);
|
||||
if (is_array($fileInfo) && is_array($tmpFileInfo)) {
|
||||
if ($fileInfo && $tmpFileInfo) {
|
||||
$fileInfo['encrypted'] = true;
|
||||
$fileInfo['unencrypted_size'] = $tmpFileInfo['size'];
|
||||
$view->putFileInfo($path, $fileInfo);
|
||||
|
@ -365,7 +365,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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue