Permalink
Browse files

Merge pull request #71 from pedroresende/array_error

Fix in memcache.php
  • Loading branch information...
2 parents 1606a2b + 6a51da9 commit df441ca1d6fbd41acc170bf71f217b5f85298c8e @tedivm tedivm committed Mar 30, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/Stash/Driver/Sub/Memcache.php
@@ -30,9 +30,9 @@ public function initialize($servers, array $options = array())
$memcache = new \Memcache();
foreach ($servers as $server) {
- $host = $server[0];
- $port = isset($server[1]) ? $server[1] : 11211;
- $weight = isset($server[2]) ? (int)$server[2] : null;
+ $host = $server['server'];
+ $port = isset($server['port']) ? $server['port'] : 11211;
+ $weight = isset($server['weight']) ? (int)$server['weight'] : null;
if (is_integer($weight)) {
$memcache->addServer($host, $port, true, $weight);

0 comments on commit df441ca

Please sign in to comment.