Unverified Commit 66f05774 authored by Sergei Morozov's avatar Sergei Morozov Committed by GitHub

Merge pull request #3933 from morozov/remove-mysqli-default-port

Removed the hard-coded MySQL default port and the usage of ini-settings
parents 8d2aa414 8568ca65
......@@ -47,16 +47,10 @@ class MysqliConnection implements PingableConnection, ServerInfoAwareConnection
*/
public function __construct(array $params, $username, $password, array $driverOptions = [])
{
$port = $params['port'] ?? ini_get('mysqli.default_port');
// Fallback to default MySQL port if not given.
if (! $port) {
$port = 3306;
}
$socket = $params['unix_socket'] ?? ini_get('mysqli.default_socket');
$dbname = $params['dbname'] ?? null;
$host = $params['host'];
$port = $params['port'] ?? null;
if (! empty($params['persistent'])) {
$host = 'p:' . $host;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment