Merge pull request #12242 from owncloud/fix-undefined-size
Check if the size field is available
This commit is contained in:
commit
8d4e63dd7c
|
@ -122,7 +122,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
|
|||
* @return int
|
||||
*/
|
||||
public function getSize() {
|
||||
return $this->data['size'];
|
||||
return isset($this->data['size']) ? $this->data['size'] : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue