Skip to content

Commit

Permalink
修正real_connect传参
Browse files Browse the repository at this point in the history
62行少传了`socket`参数,导致`$flags`实际上被传给了`socket`
  • Loading branch information
boris1993 committed Dec 26, 2024
1 parent f48ffd0 commit 1a0d395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/class.mysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct($host, $user, $pw, $name, $long = false, $useSSL = f
if ($long) {
$host = 'p:' . $host;
}
$connected = $mysqli->real_connect($host, $user, $pw, $name, null, $flags);
$connected = $mysqli->real_connect($host, $user, $pw, $name, null, null, $flags);
} else {
if ($long) {
$connected = $mysqli->real_connect('p:' . substr($host, 0, $coninfo), $user, $pw, $name, substr($host, $coninfo + 1), null, $flags);
Expand Down

0 comments on commit 1a0d395

Please sign in to comment.