Skip to content

Commit 7ef4aad

Browse files
author
Igor V. Gulyaev
committed
* bit tune
1 parent 29fcb2b commit 7ef4aad

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

core/Cache/WatermarkedPeer.class.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,16 @@ public function getList($indexes)
114114
foreach ($indexes as $index)
115115
$peerIndexMap[$this->getActualWatermark().$index] = $index;
116116

117-
$peerResult = $this->peer->getList(array_keys($peerIndexMap));
117+
$peerIndexes = array_keys($peerIndexMap);
118+
$peerResult = $this->peer->getList($peerIndexes);
118119

119120
$result = array();
120-
foreach ($peerResult as $key => $value) {
121-
$result[$peerIndexMap[$key]] = $value;
121+
if (!empty($peerResult)) {
122+
foreach ($peerResult as $key => $value) {
123+
$result[$peerIndexMap[$key]] = $value;
124+
}
125+
} else {
126+
$result = $peerResult;
122127
}
123128

124129
return $result;

0 commit comments

Comments
 (0)