Merge pull request #966 from racklin/develop

Fixed IoC::resolve forces singleton issue.
This commit is contained in:
Taylor Otwell 2012-07-17 17:16:43 -07:00
commit c6e4a25ae9
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}