]> git.mxchange.org Git - friendica.git/blobdiff - tests/Util/Database/StaticDatabase.php
Merge branch 'bug/phpinfo-accessible-hotfix' into develop
[friendica.git] / tests / Util / Database / StaticDatabase.php
index dcc5d9db46fab1647f5d3a07972cf52346555f08..73a142d9a9c32931648f009a571c3f3c15674ed5 100644 (file)
@@ -1,4 +1,23 @@
 <?php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
 
 namespace Friendica\Test\Util\Database;
 
@@ -37,6 +56,8 @@ class StaticDatabase extends Database
                $this->driver = 'pdo';
                $this->connection = self::$staticConnection;
                $this->connected = true;
+               $this->emulate_prepares = false;
+               $this->pdo_emulate_prepares = false;
 
                return $this->connected;
        }
@@ -80,7 +101,7 @@ class StaticDatabase extends Database
        {
                // Use environment variables for mysql if they are set beforehand
                if (!empty($server['MYSQL_HOST'])
-                   && (!empty($server['MYSQL_USERNAME'] || !empty($server['MYSQL_USER'])))
+                   && (!empty($server['MYSQL_USERNAME']) || !empty($server['MYSQL_USER']))
                    && $server['MYSQL_PASSWORD'] !== false
                    && !empty($server['MYSQL_DATABASE']))
                {