mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 06:07:39 +02:00
Tracy\Panel: fixed object to string converion error with custom driver (#373)
Co-authored-by: Miloslav Hůla <miloslav.hula@fsv.cvut.cz>
This commit is contained in:
committed by
David Grudl
parent
df4cddac1f
commit
7b02296f3e
@@ -167,7 +167,8 @@ class Panel implements Tracy\IBarPanel
|
||||
|
||||
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') : '');
|
||||
}
|
||||
|
Reference in New Issue
Block a user