Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Commit

Permalink
Fix setting of ProfilingAdapter
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Koopzington committed Apr 8, 2015
1 parent 111b7bc commit 8658119
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Module.php
Expand Up @@ -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());
Expand Down

0 comments on commit 8658119

Please sign in to comment.