Skip to content
Browse files

MDL-26290 add experimental windows mysqli named pipe support

  • Loading branch information...
1 parent 77f9f23 commit 8c4b142cb20a17a3d420379e5067bfc2a48ab8ec @skodak skodak committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/dml/mysqli_native_moodle_database.php
View
3 lib/dml/mysqli_native_moodle_database.php
@@ -271,7 +271,8 @@ public function connect($dbhost, $dbuser, $dbpass, $dbname, $prefix, array $dbop
// dbsocket is used ONLY if host is NULL or 'localhost',
// you can not disable it because it is always tried if dbhost is 'localhost'
- if (!empty($this->dboptions['dbsocket']) and strpos($this->dboptions['dbsocket'], '/') !== false) {
+ if (!empty($this->dboptions['dbsocket'])
+ and (strpos($this->dboptions['dbsocket'], '/') !== false or strpos($this->dboptions['dbsocket'], '\\') !== false)) {
$dbsocket = $this->dboptions['dbsocket'];
} else {
$dbsocket = ini_get('mysqli.default_socket');

0 comments on commit 8c4b142

Please sign in to comment.
Something went wrong with that request. Please try again.