From a2c28f9930a74a252de990db0b919c2e735a9018 Mon Sep 17 00:00:00 2001 From: Marc Bennewitz Date: Thu, 14 Aug 2014 11:17:08 +0200 Subject: [PATCH] fixed zendframework/zf2#6324: Redis::setItems: the last item is overwritten --- src/Storage/Adapter/Redis.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Storage/Adapter/Redis.php b/src/Storage/Adapter/Redis.php index 761b597..1adb3d4 100644 --- a/src/Storage/Adapter/Redis.php +++ b/src/Storage/Adapter/Redis.php @@ -172,7 +172,7 @@ protected function internalGetItems(array & $normalizedKeys) $redis = $this->getRedisResource(); $namespacedKeys = array(); - foreach ($normalizedKeys as & $normalizedKey) { + foreach ($normalizedKeys as $normalizedKey) { $namespacedKeys[] = $this->namespacePrefix . $normalizedKey; } @@ -252,8 +252,8 @@ protected function internalSetItems(array & $normalizedKeyValuePairs) $ttl = $this->getOptions()->getTtl(); $namespacedKeyValuePairs = array(); - foreach ($normalizedKeyValuePairs as $normalizedKey => & $value) { - $namespacedKeyValuePairs[$this->namespacePrefix . $normalizedKey] = & $value; + foreach ($normalizedKeyValuePairs as $normalizedKey => $value) { + $namespacedKeyValuePairs[$this->namespacePrefix . $normalizedKey] = $value; } try { if ($ttl > 0) {