From 096f9c2b7871af431638329d9c4e4170b9a23bf5 Mon Sep 17 00:00:00 2001 From: Rack Lin Date: Tue, 17 Jul 2012 17:42:01 +0800 Subject: [PATCH] Fixed IoC::resolve forces singleton issue. Signed-off-by: Rack Lin --- laravel/ioc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/ioc.php b/laravel/ioc.php index 11292925..60313de9 100644 --- a/laravel/ioc.php +++ b/laravel/ioc.php @@ -124,7 +124,7 @@ public static function resolve($type, $parameters = array()) // If the requested type is registered as a singleton, we want to cache off // the instance in memory so we can return it later without creating an // entirely new instances of the object on each subsequent request. - if (isset(static::$registry[$type]['singleton'])) + if (isset(static::$registry[$type]['singleton']) && static::$registry[$type]['singleton'] === true) { static::$singletons[$type] = $object; }