We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a09dd0 commit e412c83Copy full SHA for e412c83
1 file changed
src/Pdo/PdoDriver.php
@@ -209,7 +209,8 @@ public function connect()
209
break;
210
211
case 'mysql':
212
- $this->options['port'] = $this->options['port'] ?? 3306;
+ // Extract host and port or socket from host option
213
+ $this->setHostPortSocket(3306);
214
215
if ($this->options['socket'] !== null) {
216
$format = 'mysql:unix_socket=#SOCKET#;dbname=#DBNAME#;charset=#CHARSET#';
@@ -257,7 +258,8 @@ public function connect()
257
258
259
260
case 'pgsql':
- $this->options['port'] = $this->options['port'] ?? 5432;
261
262
+ $this->setHostPortSocket(5432);
263
264
265
$format = 'pgsql:host=#SOCKET#;dbname=#DBNAME#';
0 commit comments