diff --git a/src/Symfony/Bundle/DoctrineBundle/DoctrineBundle.php b/src/Symfony/Bundle/DoctrineBundle/DoctrineBundle.php index 2ef73a3839d6..7bd97e942158 100644 --- a/src/Symfony/Bundle/DoctrineBundle/DoctrineBundle.php +++ b/src/Symfony/Bundle/DoctrineBundle/DoctrineBundle.php @@ -42,9 +42,9 @@ class_exists('Doctrine\ORM\Mapping\Driver\AnnotationDriver'); if ($this->container->hasParameter('doctrine.orm.proxy_namespace')) { $namespace = $this->container->getParameter('doctrine.orm.proxy_namespace'); $dir = $this->container->getParameter('doctrine.orm.proxy_dir'); - $container = $this->container; + $container =& $this->container; - spl_autoload_register(function($class) use ($namespace, $dir, $container) { + spl_autoload_register(function($class) use ($namespace, $dir, &$container) { if (0 === strpos($class, $namespace)) { $className = substr($class, strlen($namespace) +1); $file = $dir.DIRECTORY_SEPARATOR.$className.'.php';