]> git.mxchange.org Git - friendica.git/commitdiff
Update src/Database/Database.php
authork-alin <63866963+k-alin@users.noreply.github.com>
Fri, 25 Feb 2022 15:09:54 +0000 (16:09 +0100)
committerGitHub <noreply@github.com>
Fri, 25 Feb 2022 15:09:54 +0000 (16:09 +0100)
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
src/Database/Database.php

index 920392a0f32f557150be30273b80aecd8129d28b..88d8d7d0f6ef87baa78cbc7f63dcd2cceeb65c15 100644 (file)
@@ -136,11 +136,11 @@ class Database
                                $connect .= ";charset=" . $charset;
                        }
 
-               if ($socket) {
-                       $connect .= ";$unix_socket=" . $socket;
-               }
+                       if ($socket) {
+                               $connect .= ";$unix_socket=" . $socket;
+                       }
 
-               try {
+                       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);