diff --git a/module/VuFind/src/VuFind/Db/Table/PluginManager.php b/module/VuFind/src/VuFind/Db/Table/PluginManager.php index eb287316f93c1733a8e1f93606b94b2a9d1ff4cd..5d467f3f9d14d0137992f818cc67478478896d86 100644 --- a/module/VuFind/src/VuFind/Db/Table/PluginManager.php +++ b/module/VuFind/src/VuFind/Db/Table/PluginManager.php @@ -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); }