aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/db.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/private/db.php b/lib/private/db.php
index eec2b9220e2..d3bf8c0016c 100644
--- a/lib/private/db.php
+++ b/lib/private/db.php
@@ -65,7 +65,6 @@ class OC_DB {
$type = OC_Config::getValue( "dbtype", "sqlite" );
if(strpos($host, ':')) {
list($host, $socket)=explode(':', $host, 2);
- $port = ctype_digit($socket) && $socket<=65535;
} else {
$socket=FALSE;
}
@@ -90,7 +89,7 @@ class OC_DB {
'dbname' => $name,
);
if ($socket) {
- if ($port) {
+ if (ctype_digit($socket) && $socket <= 65535) {
$connectionParams['port'] = $socket;
} else {
$connectionParams['unix_socket'] = $socket;