]> git.mxchange.org Git - friendica.git/commitdiff
Fixed:
authorRoland Häder <roland@mxchange.org>
Sat, 21 Jul 2018 02:21:01 +0000 (04:21 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 22 Jul 2018 14:27:51 +0000 (16:27 +0200)
- better use `false` and `$port > 0`

src/Database/DBA.php

index dbf9b41ca27c61b826852404a79f3769d9a83688..f5e785955c8c21813a38b2d7b4852bbaee4ff6eb 100644 (file)
@@ -51,7 +51,7 @@ class DBA
                self::$db_name = $db;
                self::$db_charset = $charset;
 
-               $port = 3306;
+               $port = false;
                $serveraddr = trim($serveraddr);
 
                $serverdata = explode(':', $serveraddr);
@@ -75,7 +75,7 @@ class DBA
                        self::$driver = 'pdo';
                        $connect = "mysql:host=".$server.";dbname=".$db;
 
-                       if (isset($port)) {
+                       if ($port > 0) {
                                $connect .= ";port=".$port;
                        }