From 8658119312e34f2987453c488ac5ed44b76daa30 Mon Sep 17 00:00:00 2001 From: Koopzington Date: Wed, 8 Apr 2015 17:49:29 +0200 Subject: [PATCH] Fix setting of ProfilingAdapter Since there was the variable $p I figured that there should be 2 ifs instead of if and elseif. By splitting this up, it'll be possible to use Zend\Db\Adapter\ProfilingAdapter even if Zend\Db\Adapter\Adapter is set and NOT an instanceof ProfilingAdapter --- Module.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Module.php b/Module.php index def8572..b8feedf 100644 --- a/Module.php +++ b/Module.php @@ -216,7 +216,8 @@ public function getServiceConfig() $p = true; $db->setProfiler($adapter->getProfiler()); } - } elseif (!$p && $sm->has('Zend\Db\Adapter\ProfilingAdapter')) { + } + if (!$p && $sm->has('Zend\Db\Adapter\ProfilingAdapter')) { $adapter = $sm->get('Zend\Db\Adapter\ProfilingAdapter'); if ($adapter instanceof ProfilingAdapter) { $db->setProfiler($adapter->getProfiler());