diff --git a/library/Zend/Log/Logger.php b/library/Zend/Log/Logger.php index 8011e5929a7..11b6f47602f 100644 --- a/library/Zend/Log/Logger.php +++ b/library/Zend/Log/Logger.php @@ -142,14 +142,14 @@ public function __construct($options = null) } // Inject writer plugin manager, if available - if (isset($options['writer_plugin_manager']) + if (isset($options['writer_plugin_manager']) && $options['writer_plugin_manager'] instanceof AbstractPluginManager ) { $this->setWriterPluginManager($options['writer_plugin_manager']); } // Inject processor plugin manager, if available - if (isset($options['processor_plugin_manager']) + if (isset($options['processor_plugin_manager']) && $options['processor_plugin_manager'] instanceof AbstractPluginManager ) { $this->setProcessorPluginManager($options['processor_plugin_manager']); diff --git a/library/Zend/Log/LoggerAbstractServiceFactory.php b/library/Zend/Log/LoggerAbstractServiceFactory.php index 4712ef07984..b4611e15983 100644 --- a/library/Zend/Log/LoggerAbstractServiceFactory.php +++ b/library/Zend/Log/LoggerAbstractServiceFactory.php @@ -91,7 +91,7 @@ protected function getConfig(ServiceLocatorInterface $services) protected function processConfig(&$config, ServiceLocatorInterface $services) { - if (isset($config['writer_plugin_manager']) + if (isset($config['writer_plugin_manager']) && is_string($config['writer_plugin_manager']) && $services->has($config['writer_plugin_manager']) ) { @@ -105,7 +105,7 @@ protected function processConfig(&$config, ServiceLocatorInterface $services) $config['writer_plugin_manager'] = $services->get('LogWriterManager'); } - if (isset($config['processor_plugin_manager']) + if (isset($config['processor_plugin_manager']) && is_string($config['processor_plugin_manager']) && $services->has($config['processor_plugin_manager']) ) {