Browse Source

Fixed IoC::resolve forces singleton issue.

Signed-off-by: Rack Lin <racklin@gmail.com>
Rack Lin 12 years ago
parent
commit
096f9c2b78
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/ioc.php

+ 1 - 1
laravel/ioc.php

@@ -124,7 +124,7 @@ class IoC {
 		// 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;
 		}