]> git.mxchange.org Git - friendica.git/commitdiff
Fixes:
authorRoland Häder <roland@mxchange.org>
Sat, 21 Jul 2018 00:17:47 +0000 (02:17 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 22 Jul 2018 14:27:50 +0000 (16:27 +0200)
- fixed missing variable $port (MySQL: 3306)
- "imported" mysqli class

Signed-off-by: Roland Häder <roland@mxchange.org>
boot.php
src/Database/DBA.php

index 4c3a8c5ca88f371647cd3e02d675218c17d5c390..0aeb551a55029a03e362f1a804a934b30154302a 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -768,14 +768,14 @@ function run_update_function($x, $prefix)
                        return false;
                } else {
                        Config::set('database', $funcname, 'success');
-                       if ($post_update) {
+                       if (isset($post_update)) {
                                Config::set('system', 'build', $x);
                        }
                        return true;
                }
        } else {
                Config::set('database', $funcname, 'success');
-               if ($post_update) {
+               if (isset($post_update)) {
                        Config::set('system', 'build', $x);
                }
                return true;
index 51b2c8898e6b49524d6d0000c6d146ad17aa6092..dbf9b41ca27c61b826852404a79f3769d9a83688 100644 (file)
@@ -8,6 +8,7 @@ namespace Friendica\Database;
 
 use Friendica\Core\System;
 use Friendica\Util\DateTimeFormat;
+use mysqli;
 use PDO;
 use PDOException;
 use PDOStatement;
@@ -50,6 +51,7 @@ class DBA
                self::$db_name = $db;
                self::$db_charset = $charset;
 
+               $port = 3306;
                $serveraddr = trim($serveraddr);
 
                $serverdata = explode(':', $serveraddr);
@@ -89,7 +91,7 @@ class DBA
                        }
                }
 
-               if (!self::$connected && class_exists('mysqli')) {
+               if (!self::$connected && class_exists('\mysqli')) {
                        self::$driver = 'mysqli';
                        self::$db = @new mysqli($server, $user, $pass, $db, $port);
                        if (!mysqli_connect_errno()) {