Skip to content

Commit 96f3448

Browse files
committed
Do not return true in case of the constructor
1 parent 44a246a commit 96f3448

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ PHP 8.1 UPGRADE NOTES
100100
. Classes extending mysqli_stmt::execute() will be required to specify the
101101
additional parameter now.
102102
RFC: https://wiki.php.net/rfc/mysqli_bind_in_execute
103+
. mysqli::connect() will now return true instead of null on success.
103104

104105
- MySQLnd:
105106
. The mysqlnd.fetch_copy_data ini setting has been removed. However, this

ext/mysqli/mysqli_nonapi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,9 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, bool is_real_connect, b
362362
(Z_MYSQLI_P(object))->ptr = mysqli_resource;
363363
}
364364

365-
RETURN_TRUE;
365+
if (!in_ctor) {
366+
RETURN_TRUE;
367+
}
366368

367369
err:
368370
if (mysql->hash_key) {

0 commit comments

Comments
 (0)