diff options
Diffstat (limited to 'ext/pdo_mysql/mysql_driver.c')
-rw-r--r-- | ext/pdo_mysql/mysql_driver.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 7da8c0d0df..467298ef1d 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2014 The PHP Group | + | Copyright (c) 1997-2015 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -748,7 +748,12 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options) if(vars[3].optval) { port = atoi(vars[3].optval); } + +#ifdef PHP_WIN32 + if (vars[2].optval && !strcmp(".", vars[2].optval)) { +#else if (vars[2].optval && !strcmp("localhost", vars[2].optval)) { +#endif unix_socket = vars[4].optval; } |