diff --git a/laravel/container.php b/laravel/container.php index a5f5af06..6a7f07b8 100644 --- a/laravel/container.php +++ b/laravel/container.php @@ -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