Skip to content

Commit

Permalink
Fix ignored port in getConnectionString() (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzikarsky authored and kelunik committed Dec 13, 2019
1 parent 361d93d commit 739710a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ConnectionConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,12 @@ public function getConnectionString(): string
}

$host = $this->getHost();
$port = $this->getPort();

$index = \strpos($host, ':');

if ($index === false) {
return $this->string = "tcp://$host:3306";
return $this->string = "tcp://$host:$port";
}

if ($index === 0) {
Expand Down

0 comments on commit 739710a

Please sign in to comment.