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

Commit

Permalink
Merge branch 'hotfix/218' into develop
Browse files Browse the repository at this point in the history
Forward port #218
  • Loading branch information
weierophinney committed Sep 8, 2016
2 parents abff483 + 97ed78a commit 11d2d7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -40,6 +40,10 @@ All notable changes to this project will be documented in this file, in reverse

- [#215](https://github.com/zendframework/ZendDeveloperTools/pull/215) replaces
the ZF logo to remove the "2".
- [#218](https://github.com/zendframework/ZendDeveloperTools/pull/218) updates
the logic for retrieving a zend-db `Adapter` to only do so if `db`
configuration also exists; this ensures the toolbar does not cause a fatal
error if zend-db is installed but no adapter configured.

## 1.1.0 - 2016-06-27

Expand Down
4 changes: 2 additions & 2 deletions src/Module.php
Expand Up @@ -200,15 +200,15 @@ public function getServiceConfig()
$p = false;
$db = new Collector\DbCollector();

if ($sm->has('Zend\Db\Adapter\Adapter')) {
if ($sm->has('Zend\Db\Adapter\Adapter') && isset($sm->get('config')['db'])) {
$adapter = $sm->get('Zend\Db\Adapter\Adapter');
if ($adapter instanceof ProfilingAdapter) {
$p = true;
$db->setProfiler($adapter->getProfiler());
}
}

if (! $p && $sm->has('Zend\Db\Adapter\AdapterInterface')) {
if (! $p && $sm->has('Zend\Db\Adapter\AdapterInterface') && isset($sm->get('config')['db'])) {
$adapter = $sm->get('Zend\Db\Adapter\AdapterInterface');
if ($adapter instanceof ProfilingAdapter) {
$p = true;
Expand Down

0 comments on commit 11d2d7e

Please sign in to comment.