Fix default if no serverpool is provided

This commit is contained in:
Marcel Beerta 2012-02-19 08:56:31 +01:00
parent 2a65121865
commit 0e0141805c

View File

@ -54,12 +54,14 @@ class MemcacheSessionStorage extends AbstractSessionStorage implements SessionHa
// defaults // defaults
if (!isset($memcacheOptions['serverpool'])) { if (!isset($memcacheOptions['serverpool'])) {
$memcacheOptions['serverpool'] = array( $memcacheOptions['serverpool'] = array(array(
'host' => '127.0.0.1', 'host' => '127.0.0.1',
'port' => 11211, 'port' => 11211,
'timeout' => 1, 'timeout' => 1,
'persistent' => false, 'persistent' => false,
'weight' => 1); 'weight' => 1,
'retry_interval' => 15
));
} }
$memcacheOptions['expiretime'] = isset($memcacheOptions['expiretime']) ? (int)$memcacheOptions['expiretime'] : 86400; $memcacheOptions['expiretime'] = isset($memcacheOptions['expiretime']) ? (int)$memcacheOptions['expiretime'] : 86400;