diff options
author | Robin Appelman <robin@icewind.nl> | 2021-03-24 14:56:40 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-03-24 14:56:40 +0100 |
commit | 8a92229485095dbd8f379e2b489a3aa48cc37c79 (patch) | |
tree | c2625fc1dd67a28f6cb95746f4ae8a2d6805dcf6 /lib | |
parent | e8184eaaada6bfe373877226e4a1ddfab2b2a1c6 (diff) | |
download | nextcloud-server-8a92229485095dbd8f379e2b489a3aa48cc37c79.tar.gz nextcloud-server-8a92229485095dbd8f379e2b489a3aa48cc37c79.zip |
getStorage can also return null
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Filesystem.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Mount/MountPoint.php | 4 | ||||
-rw-r--r-- | lib/private/Files/Node/Folder.php | 2 | ||||
-rw-r--r-- | lib/public/Files/Mount/IMountPoint.php | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php index bf94be273f2..fade3b69fbb 100644 --- a/lib/private/Files/Filesystem.php +++ b/lib/private/Files/Filesystem.php @@ -312,7 +312,7 @@ class Filesystem { * get the storage mounted at $mountPoint * * @param string $mountPoint - * @return \OC\Files\Storage\Storage + * @return \OC\Files\Storage\Storage|null */ public static function getStorage($mountPoint) { if (!self::$mounts) { diff --git a/lib/private/Files/Mount/MountPoint.php b/lib/private/Files/Mount/MountPoint.php index cbf3785c409..891bbc41c36 100644 --- a/lib/private/Files/Mount/MountPoint.php +++ b/lib/private/Files/Mount/MountPoint.php @@ -39,7 +39,7 @@ use OCP\ILogger; class MountPoint implements IMountPoint { /** - * @var \OC\Files\Storage\Storage $storage + * @var \OC\Files\Storage\Storage|null $storage */ protected $storage = null; protected $class; @@ -167,7 +167,7 @@ class MountPoint implements IMountPoint { } /** - * @return \OC\Files\Storage\Storage + * @return \OC\Files\Storage\Storage|null */ public function getStorage() { if (is_null($this->storage)) { diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index ec73a8c06ae..7b1eff47cd5 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -494,7 +494,7 @@ class Folder extends Node implements \OCP\Files\Folder { $mounts[] = $this->getMountPoint(); $mounts = array_filter($mounts, function (IMountPoint $mount) { - return $mount->getStorage(); + return $mount->getStorage() !== null; }); $storageIds = array_map(function (IMountPoint $mount) { return $mount->getStorage()->getCache()->getNumericStorageId(); diff --git a/lib/public/Files/Mount/IMountPoint.php b/lib/public/Files/Mount/IMountPoint.php index 7315fd97035..51a5fbade48 100644 --- a/lib/public/Files/Mount/IMountPoint.php +++ b/lib/public/Files/Mount/IMountPoint.php @@ -48,7 +48,7 @@ interface IMountPoint { /** * Get the storage that is mounted * - * @return \OC\Files\Storage\Storage + * @return \OC\Files\Storage\Storage|null * @since 8.0.0 */ public function getStorage(); |