Skip to content

Commit 66f0577

Browse files
authored
Merge pull request #3933 from morozov/remove-mysqli-default-port
Removed the hard-coded MySQL default port and the usage of ini-settings
2 parents 8d2aa41 + 8568ca6 commit 66f0577

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Driver/Mysqli/MysqliConnection.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,10 @@ class MysqliConnection implements PingableConnection, ServerInfoAwareConnection
4747
*/
4848
public function __construct(array $params, $username, $password, array $driverOptions = [])
4949
{
50-
$port = $params['port'] ?? ini_get('mysqli.default_port');
51-
52-
// Fallback to default MySQL port if not given.
53-
if (! $port) {
54-
$port = 3306;
55-
}
56-
5750
$socket = $params['unix_socket'] ?? ini_get('mysqli.default_socket');
5851
$dbname = $params['dbname'] ?? null;
5952
$host = $params['host'];
53+
$port = $params['port'] ?? null;
6054

6155
if (! empty($params['persistent'])) {
6256
$host = 'p:' . $host;

0 commit comments

Comments
 (0)