Skip to content

Commit 7dca926

Browse files
author
Vincent Petry
committed
Remove redundant empty check
1 parent 8e7ed3a commit 7dca926

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/private/Files/Cache/Storage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static function getStorageById($storageId) {
109109
self::$localCache = new CappedMemoryCache();
110110
}
111111
$result = self::$localCache->get($storageId);
112-
if ($result === null || empty($result) || !isset($result['numeric_id'])) {
112+
if ($result === null || !isset($result['numeric_id'])) {
113113
$result = self::getStorageByIdFromCache($storageId);
114114
self::$localCache->set($storageId, $result);
115115
}
@@ -134,7 +134,7 @@ private static function getDistributedCache() {
134134
*/
135135
private static function getStorageByIdFromCache($storageId) {
136136
$result = self::getDistributedCache()->get($storageId);
137-
if ($result === null || empty($result) || !isset($result['numeric_id'])) {
137+
if ($result === null || !isset($result['numeric_id'])) {
138138
$result = self::getStorageByIdFromDb($storageId);
139139
self::getDistributedCache()->set(
140140
$storageId, $result, self::$distributedCacheTTL

0 commit comments

Comments
 (0)