From 7b7d1e3c0911639cba4c20eba7d0a8352091643f Mon Sep 17 00:00:00 2001 From: John Molakvoæ Date: Sat, 5 Aug 2023 12:05:36 +0200 Subject: fix: simplify `sourceData` check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Signed-off-by: John Molakvoæ --- lib/private/Files/Cache/Cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/Files/Cache/Cache.php') diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index d3593cac8b9..287966e4a28 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -668,7 +668,7 @@ class Cache implements ICache { $targetPath = $this->normalize($targetPath); $sourceData = $sourceCache->get($sourcePath); - if ($sourceData === false || $sourceData === null) { + if (!$sourceData) { throw new \Exception('Invalid source storage path: ' . $sourcePath); } -- cgit v1.2.3