]> git.mxchange.org Git - friendica.git/commitdiff
Use protected $this->logger instead
authorRoland Häder <roland@mxchange.org>
Tue, 21 Jun 2022 15:54:23 +0000 (17:54 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 21 Jun 2022 15:54:48 +0000 (17:54 +0200)
tests/Util/Database/StaticDatabase.php

index 5be4776ee2b39469801bd1ac8067e8e483dee0b3..22c44affdad99988106d8540ca0d84ff2ebfa144 100644 (file)
@@ -21,7 +21,6 @@
 
 namespace Friendica\Test\Util\Database;
 
-use Friendica\Core\Logger;
 use Friendica\Database\Database;
 use Friendica\Database\DatabaseException;
 use PDO;
@@ -46,7 +45,7 @@ class StaticDatabase extends Database
        /**
         * Override the behaviour of connect, due there is just one, static connection at all
         *
-        * @return bool|void
+        * @return bool Success
         */
        public function connect(): bool
        {
@@ -181,7 +180,7 @@ class StaticDatabase extends Database
                        self::$staticConnection->setAttribute(PDO::ATTR_AUTOCOMMIT,0);
                } catch (PDOException $e) {
                        // Log exception
-                       Logger::error('Cannot establish database connection', ['exception' => $e, 'host' => $server, 'dbname' => $db]);
+                       $this->logger::error('Cannot establish database connection', ['exception' => $e, 'host' => $server, 'dbname' => $db]);
                }
        }