Skip to content

Commit 4af95b7

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Fix mysql tests with non-standard server port
2 parents b22758d + 72fc8b5 commit 4af95b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/mysqli/tests/bug73462.phpt

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ require_once('skipifconnectfailure.inc');
1111
require_once("connect.inc");
1212

1313
/* Initial persistent connection */
14-
$mysql_1 = new mysqli('p:'.$host, $user, $passwd, $db);
14+
$mysql_1 = new mysqli('p:'.$host, $user, $passwd, $db, $port);
1515
$result = $mysql_1->query("SHOW STATUS LIKE 'Connections'");
1616
$c1 = $result->fetch_row();
1717
$result->free();
1818
$mysql_1->close();
1919

2020
/* Failed connection to invalid host */
21-
$mysql_2 = @new mysqli(' !!! invalid !!! ', $user, $passwd, $db);
21+
$mysql_2 = @new mysqli(' !!! invalid !!! ', $user, $passwd, $db, $port);
2222
try {
2323
$mysql_2->close();
2424
} catch (Error $exception) {
2525
echo $exception->getMessage() . "\n";
2626
}
2727

2828
/* Re-use persistent connection */
29-
$mysql_3 = new mysqli('p:'.$host, $user, $passwd, $db);
29+
$mysql_3 = new mysqli('p:'.$host, $user, $passwd, $db, $port);
3030
$error = mysqli_connect_errno();
3131
$result = $mysql_3->query("SHOW STATUS LIKE 'Connections'");
3232
$c3 = $result->fetch_row();

ext/mysqli/tests/bug73949.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class cc{
1414
function __construct($c=null){
1515
}
1616
};
17-
$i=mysqli_connect('p:'.$host, $user, $passwd, $db);
17+
$i=mysqli_connect('p:'.$host, $user, $passwd, $db, $port);
1818
$res=mysqli_query($i, "SHOW STATUS LIKE 'Connections'");
1919
$t=array(new stdClass);
2020
while($db= mysqli_fetch_object($res,'cc',$t)){}

0 commit comments

Comments
 (0)