From b9f42c27cbd5d96c4e3fcb29c8f0bcc3982fd300 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 13 Jan 2011 11:28:36 -0500 Subject: [PATCH] Don't serialze the params array for the _instance key. It's not necessary, and it causes problems with some drivers. --- kronolith/lib/Injector/Factory/Driver.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kronolith/lib/Injector/Factory/Driver.php b/kronolith/lib/Injector/Factory/Driver.php index 4b8bb60e2..d8ea70f1d 100644 --- a/kronolith/lib/Injector/Factory/Driver.php +++ b/kronolith/lib/Injector/Factory/Driver.php @@ -39,12 +39,11 @@ class Kronolith_Injector_Factory_Driver */ public function create($driver, $params = array()) { - $key = $driver . md5(serialize($params)); - if (!empty($this->_instances[$key])) { - return $this->_instances[$key]; - } - $driver = basename($driver); + if (!empty($this->_instances[$driver])) { + return $this->_instances[$driver]; + } + $key = $driver; $class = 'Kronolith_Driver_' . $driver; if (class_exists($class)) { $driver = new $class($params); -- 2.11.0