diff options
-rw-r--r-- | lib/private/db.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/db.php b/lib/private/db.php index e911abd5f8b..bc9137fefd3 100644 --- a/lib/private/db.php +++ b/lib/private/db.php @@ -76,11 +76,11 @@ class OC_DB { $host = OC_Config::getValue('dbhost', ''); if (strpos($host, ':')) { // Host variable may carry a port or socket. - list($host, $socket) = explode(':', $host, 2); - if (ctype_digit($socket)) { - $connectionParams['port'] = $socket; + list($host, $portOrSocket) = explode(':', $host, 2); + if (ctype_digit($portOrSocket)) { + $connectionParams['port'] = $portOrSocket; } else { - $connectionParams['unix_socket'] = $socket; + $connectionParams['unix_socket'] = $portOrSocket; } } $connectionParams['host'] = $host; |