Skip to content

Commit

Permalink
Tracy\Panel: fixed object to string converion error with custom driver (
Browse files Browse the repository at this point in the history
#373)

Co-authored-by: Miloslav Hůla <miloslav.hula@fsv.cvut.cz>
  • Loading branch information
2 people authored and dg committed Oct 8, 2020
1 parent df4cdda commit 7b02296
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Dibi/Bridges/Tracy/Panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ public function getPanel(): ?string

private function getConnectionName(Dibi\Connection $connection): string
{
return $connection->getConfig('driver')
$driver = $connection->getConfig('driver');
return (is_object($driver) ? get_class($driver) : $driver)
. ($connection->getConfig('name') ? '/' . $connection->getConfig('name') : '')
. ($connection->getConfig('host') ? ' @ ' . $connection->getConfig('host') : '');
}
Expand Down

0 comments on commit 7b02296

Please sign in to comment.