Permalink
Browse files

Resolves issue with spl_autoload_register creating new copies of the …

…container and passing that into the closure.
  • Loading branch information...
1 parent f6b4f89 commit 6e75fd16c85d563d3e98a5541cc78645639ce4c8 @jjbohn jjbohn committed with kriswallsmith Jan 23, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 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';

0 comments on commit 6e75fd1

Please sign in to comment.