diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index e0b7f2c852dc..3a48cc51eb38 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -110,7 +110,7 @@ public function getNumericStorageId() { * get the stored metadata of a file or folder * * @param string | int $file either the path of a file or folder or the file id for a file or folder - * @return ICacheEntry|false the cache entry as array of false if the file is not found in the cache + * @return ICacheEntry|false the cache entry as array or false if the file is not found in the cache */ public function get($file) { if (\is_string($file) or $file == '') { diff --git a/tests/lib/Cache/FileCacheTest.php b/tests/lib/Cache/FileCacheTest.php index 8e0b623b75b6..b7126ad4a368 100644 --- a/tests/lib/Cache/FileCacheTest.php +++ b/tests/lib/Cache/FileCacheTest.php @@ -84,8 +84,8 @@ protected function setUp(): void { } protected function tearDown(): void { - if ($this->instance) { - $this->instance->remove('hack', 'hack'); + if ($this->instance->get('hack') !== null) { + $this->instance->remove('hack'); } parent::tearDown();