Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove redundant empty check
  • Loading branch information
Vincent Petry committed Aug 9, 2017
commit 7dca92645b30a796ee17eb80bea78e1c84d19db0
4 changes: 2 additions & 2 deletions lib/private/Files/Cache/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static function getStorageById($storageId) {
self::$localCache = new CappedMemoryCache();
}
$result = self::$localCache->get($storageId);
if ($result === null || empty($result) || !isset($result['numeric_id'])) {
if ($result === null || !isset($result['numeric_id'])) {
$result = self::getStorageByIdFromCache($storageId);
self::$localCache->set($storageId, $result);
}
Expand All @@ -134,7 +134,7 @@ private static function getDistributedCache() {
*/
private static function getStorageByIdFromCache($storageId) {
$result = self::getDistributedCache()->get($storageId);
if ($result === null || empty($result) || !isset($result['numeric_id'])) {
if ($result === null || !isset($result['numeric_id'])) {
$result = self::getStorageByIdFromDb($storageId);
self::getDistributedCache()->set(
$storageId, $result, self::$distributedCacheTTL
Expand Down