X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FDatabase%2FDatabase.php;h=88d8d7d0f6ef87baa78cbc7f63dcd2cceeb65c15;hb=15de709b89d48179caf67fe73d0626b83fa555fe;hp=b5aed6c18a5f70f05444c31c0a55e4b0d4be92c7;hpb=335be6f0326e15e80d4470179c69c2a4daae6ae3;p=friendica.git diff --git a/src/Database/Database.php b/src/Database/Database.php index b5aed6c18a..88d8d7d0f6 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -135,12 +135,12 @@ class Database if ($charset) { $connect .= ";charset=" . $charset; } - - if ($socket) { - $connect .= ";$unix_socket=" . $socket; - } - - try { + + if ($socket) { + $connect .= ";$unix_socket=" . $socket; + } + + try { $this->connection = @new PDO($connect, $user, $pass, [PDO::ATTR_PERSISTENT => $persistent]); $this->connection->setAttribute(PDO::ATTR_EMULATE_PREPARES, $this->pdo_emulate_prepares); $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); @@ -165,10 +165,10 @@ class Database if ($charset) { $this->connection->set_charset($charset); } - - if ($socket) { - $this->connection->set_socket($socket); - } + + if ($socket) { + $this->connection->set_socket($socket); + } } }