From: Roland Häder Date: Sat, 21 Jul 2018 00:17:47 +0000 (+0200) Subject: Fixes: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ed6d572c3bb77031f525c5561338b2b4c9260522;p=friendica.git Fixes: - fixed missing variable $port (MySQL: 3306) - "imported" mysqli class Signed-off-by: Roland Häder --- diff --git a/boot.php b/boot.php index 4c3a8c5ca8..0aeb551a55 100644 --- 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; diff --git a/src/Database/DBA.php b/src/Database/DBA.php index 51b2c8898e..dbf9b41ca2 100644 --- a/src/Database/DBA.php +++ b/src/Database/DBA.php @@ -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()) {