Support connect to mysql using socket (#1749)
* Support connect to mysql using socket * pgsql can also use unix_socket fix Deprecated: pg_escape_string(): Automatic fetching of PostgreSQL connection * Update install.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update var/Typecho/Db/Adapter/Mysqli.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix quoteValue method to correctly escape single quotes in strings --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
+5
-1
@@ -1064,7 +1064,11 @@ function install_step_2_perform()
|
||||
|
||||
// intval port number
|
||||
if (isset($dbConfig['port'])) {
|
||||
$dbConfig['port'] = intval($dbConfig['port']);
|
||||
if (strpos($dbConfig['host'], '/') !== false && $type == 'Mysql') {
|
||||
$dbConfig['port'] = null;
|
||||
} else {
|
||||
$dbConfig['port'] = intval($dbConfig['port']);
|
||||
}
|
||||
}
|
||||
|
||||
// bool ssl verify
|
||||
|
||||
Reference in New Issue
Block a user