Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2019-11-18 09:37:26 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2019-11-18 09:37:26 +0300
commit12011166e3934f1d76f2d183a63cfe2ff9bde8e6 (patch)
tree41bb8fb25faf21cb8a4351af9aff119808ae2ab1 /libs
parentb3837f15d4ecc2ce3336104122a6ad7eb328b640 (diff)
Fix socket configuration not applied in MySQLi (#15166)
We have a `unix_socket` setting to connect using this setting instead of host & port. It is being used in the Mysqli Tracker DB but by the looks not in the MySQLi core db. Haven't tested it but should work and at least won't make it worse :)
Diffstat (limited to 'libs')
-rw-r--r--libs/Zend/Db/Adapter/Mysqli.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/Zend/Db/Adapter/Mysqli.php b/libs/Zend/Db/Adapter/Mysqli.php
index e94ec26b37..9eb3d7f482 100644
--- a/libs/Zend/Db/Adapter/Mysqli.php
+++ b/libs/Zend/Db/Adapter/Mysqli.php
@@ -346,6 +346,8 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract
}
}
+ $socket = !empty($this->_config['unix_socket']) ? $this->_config['unix_socket'] : null;
+
// Suppress connection warnings here.
// Throw an exception instead.
$_isConnected = @mysqli_real_connect(
@@ -355,7 +357,7 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract
$this->_config['password'],
$this->_config['dbname'],
$port,
- $socket = null,
+ $socket,
$enable_ssl ? $flags : null
);