We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56660c3 commit 6b1e5f7Copy full SHA for 6b1e5f7
modules/setting/database.go
@@ -105,7 +105,7 @@ func DBConnStr() (string, error) {
105
switch Database.Type {
106
case "mysql":
107
connType := "tcp"
108
- if Database.Host[0] == '/' { // looks like a unix socket
+ if len(Database.Host) > 0 && Database.Host[0] == '/' { // looks like a unix socket
109
connType = "unix"
110
}
111
tls := Database.SSLMode
0 commit comments