Commit f50a4925 authored by Taylor Otwell's avatar Taylor Otwell

fixed bug in ioc container singleton resolution.

parent 2c2dcdc5
......@@ -179,7 +179,12 @@ class Container {
$object = call_user_func($this->registry[$name]['resolver'], $this, $parameters);
return (isset($this->registry[$name]['singleton'])) ? $this->singletons[$name] = $object : $object;
if (isset($this->registry[$name]['singleton']) and $this->registry[$name]['singleton'])
{
return $this->singletons[$name] = $object;
}
return $object;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment