From 82ee78c05bd28389c2d3bb1eddb04d3c2f35ec8e Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 22 Aug 2012 15:57:23 +0300 Subject: [PATCH] Update src/Symfony/Component/DependencyInjection/Container.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This throw an exception and should not with isset: 'something' exist as service $this->container->set('something', null); if (null !== $this->container->get('something')) {     throw new \Exception('Should be null'); } --- src/Symfony/Component/DependencyInjection/Container.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 88e1f26ecde07..0e6a6c7976df4 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -238,7 +238,7 @@ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE { $id = strtolower($id); - if (isset($this->services[$id])) { + if (array_key_exists($id, $this->services)) { return $this->services[$id]; }