Skip to content
Snippets Groups Projects
Commit 86e6c965 authored by Demian Katz's avatar Demian Katz
Browse files

Fixed bug -- push custom initializer to bottom of stack rather than top; take...

Fixed bug -- push custom initializer to bottom of stack rather than top; take advantage of initializer second parameter to eliminate $self assignment.
parent 0603bdda
No related merge requests found
......@@ -49,12 +49,11 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager
\Zend\ServiceManager\ConfigInterface $configuration = null
) {
parent::__construct($configuration);
$self = $this;
$initializer = function ($instance) use ($self) {
$instance->setAdapter($self->getServiceLocator()->get('DBAdapter'));
$initializer = function ($instance, $manager) {
$instance->setAdapter($manager->getServiceLocator()->get('DBAdapter'));
$instance->initialize();
};
$this->addInitializer($initializer);
$this->addInitializer($initializer, false);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment