fix list() weirdness (might be a PHP 5 thing).
authorMichael M Slusarz <slusarz@curecanti.org>
Sun, 16 Nov 2008 22:56:43 +0000 (15:56 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Sun, 16 Nov 2008 22:56:43 +0000 (15:56 -0700)
framework/Crypt/lib/Horde/Crypt.php

index 5785a9a..1544ce6 100644 (file)
@@ -36,11 +36,13 @@ class Horde_Crypt
     static public function factory($driver, $params = array())
     {
         if (is_array($driver)) {
-            list($app, $driver) = $driver;
+            list($app, $driv_name) = $driver;
+            $driver = basename($driv_name);
+        } else {
+            $driver = basename($driver);
         }
 
         /* Return a base Horde_Crypt object if no driver is specified. */
-        $driver = basename($driver);
         if (empty($driver) || (strcmp($driver, 'none') == 0)) {
             return new Horde_Crypt();
         }