Skip to content

Commit aa1ce7b

Browse files
committed
Fix mysql connection
1 parent d69c4e3 commit aa1ce7b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Database/Connectors/MySqlConnector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public function getDsn($config)
3535

3636
$dsn = [];
3737

38-
if (isset($unix_socket)) {
38+
if (!empty($unix_socket)) {
3939
$dsn['unix_socket'] = $unix_socket;
4040
}
4141

42-
if (isset($host) && ! isset($unix_socket)) {
42+
if (isset($host) && empty($unix_socket)) {
4343
$dsn['host'] = $host;
4444
}
4545

46-
if (isset($port) && ! isset($unix_socket)) {
46+
if (isset($port) && empty($unix_socket)) {
4747
$dsn['port'] = $port;
4848
}
4949

0 commit comments

Comments
 (0)