diff options
author | Joas Schilling <coding@schilljs.com> | 2023-12-11 07:12:55 +0100 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2023-12-11 06:29:28 +0000 |
commit | d7192f570539d11ce6b578aea0df458257f6ae03 (patch) | |
tree | 04cc4db2c28c65cd3c71e14bdc252de2b4638e87 | |
parent | 28440171f4df7998ce9a265339066d7d50edf5c5 (diff) |
fix(CI): Make psalm more happy about not returning null
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | lib/Share/Helper/FilesMetadataCache.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Share/Helper/FilesMetadataCache.php b/lib/Share/Helper/FilesMetadataCache.php index 587d2a706..e7612bab6 100644 --- a/lib/Share/Helper/FilesMetadataCache.php +++ b/lib/Share/Helper/FilesMetadataCache.php @@ -70,11 +70,12 @@ class FilesMetadataCache { } } - if ($this->filesSizeData[$fileId] === null) { + $data = $this->filesSizeData[$fileId]; + if ($data === null) { throw new FilesMetadataNotFoundException(); } - return $this->filesSizeData[$fileId]; + return $data; } protected function cachePhotosSize(int $fileId, IFilesMetadata $metadata): void { |