Skip to content

Commit

Permalink
Resolves issue with spl_autoload_register creating new copies of the …
Browse files Browse the repository at this point in the history
…container and passing that into the closure.
  • Loading branch information
jjbohn authored and kriswallsmith committed Feb 23, 2012
1 parent f6b4f89 commit 6e75fd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Bundle/DoctrineBundle/DoctrineBundle.php
Expand Up @@ -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';
Expand Down

0 comments on commit 6e75fd1

Please sign in to comment.