From: Michael M Slusarz Date: Sun, 16 Nov 2008 22:56:43 +0000 (-0700) Subject: fix list() weirdness (might be a PHP 5 thing). X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e54d5dcf802eae53a3e2340550f1647c92005c82;p=horde.git fix list() weirdness (might be a PHP 5 thing). --- diff --git a/framework/Crypt/lib/Horde/Crypt.php b/framework/Crypt/lib/Horde/Crypt.php index 5785a9a28..1544ce695 100644 --- a/framework/Crypt/lib/Horde/Crypt.php +++ b/framework/Crypt/lib/Horde/Crypt.php @@ -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(); }