From 73c7d0dc8156703341733b9c39c69d05263173da Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 3 Dec 2020 11:03:17 +0100 Subject: Bump icewind/streams from 0.7.1 to 0.7.2 Signed-off-by: Christoph Wurst --- lib/private/Files/ObjectStore/StorageObjectStore.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/private/Files/ObjectStore') diff --git a/lib/private/Files/ObjectStore/StorageObjectStore.php b/lib/private/Files/ObjectStore/StorageObjectStore.php index acf46758956..2076bb3f88b 100644 --- a/lib/private/Files/ObjectStore/StorageObjectStore.php +++ b/lib/private/Files/ObjectStore/StorageObjectStore.php @@ -26,6 +26,7 @@ namespace OC\Files\ObjectStore; use OCP\Files\ObjectStore\IObjectStore; use OCP\Files\Storage\IStorage; +use function is_resource; /** * Object store that wraps a storage backend, mostly for testing purposes @@ -57,11 +58,11 @@ class StorageObjectStore implements IObjectStore { */ public function readObject($urn) { $handle = $this->storage->fopen($urn, 'r'); - if ($handle) { + if (is_resource($handle)) { return $handle; - } else { - throw new \Exception(); } + + throw new \Exception(); } /** -- cgit v1.2.3