Memcache SessionHandler instantiation fixes
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 19 May 2010 03:45:34 +0000 (21:45 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 19 May 2010 03:45:34 +0000 (21:45 -0600)
framework/Core/lib/Horde/Core/Binder/SessionHandler.php
framework/SessionHandler/lib/Horde/SessionHandler/Memcache.php

index fd17817..fe49be1 100644 (file)
@@ -21,6 +21,8 @@ class Horde_Core_Binder_SessionHandler implements Horde_Injector_Binder
 
         if (strcasecmp($driver, 'Sql') === 0) {
             $params['db'] = $injector->getInstance('Horde_Db_Adapter_Base');
+        } elseif (strcasecmp($driver, 'Memcache') === 0) {
+            $params['memcache'] = $injector->getInstance('Horde_Memcache');
         }
 
         $logger = $injector->getInstance('Horde_Log_Logger');
index ec31380..f48dff9 100644 (file)
@@ -58,7 +58,7 @@ class Horde_SessionHandler_Memcache extends Horde_SessionHandler_Driver
     public function __construct(array $params = array())
     {
         if (empty($params['memcache'])) {
-            throw InvalidArgumentException('Missing memcache argument.');
+            throw new InvalidArgumentException('Missing memcache argument.');
         }
 
         $this->_memcache = $params['memcache'];