Skip to content

Commit e54e58b

Browse files
author
Peter Körner
committed
fix wrong use of short terniary operater in databsse uri initialisation
1 parent 2ef92b8 commit e54e58b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Migrate/Command/AbstractEnvCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ protected function init(InputInterface $input, OutputInterface $output, $env = n
8080
if ($driver == 'sqlite') {
8181
$uri .= ":$dbname";
8282
} else {
83-
$uri .= ($dbname == null) ?: ":dbname=$dbname";
84-
$uri .= ($host == null) ?: ";host=$host";
85-
$uri .= ($port == null) ?: ";port=$port";
83+
$uri .= ($dbname == null) ? '' : ":dbname=$dbname";
84+
$uri .= ($host == null) ? '' : ";host=$host";
85+
$uri .= ($port == null) ? '' : ";port=$port";
8686
}
8787
$this->db = new \PDO(
8888
$uri,

0 commit comments

Comments
 (0)