[wp-trac] [WordPress Trac] #56836: PHP 8.1 Deprecation Warning for mysqli_real_connect

WordPress Trac noreply at wordpress.org
Mon Oct 17 01:04:18 UTC 2022


#56836: PHP 8.1 Deprecation Warning for mysqli_real_connect
--------------------------+------------------------------
 Reporter:  nickchomey    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Database      |     Version:  6.0.2
 Severity:  normal        |  Resolution:  duplicate
 Keywords:  php81         |     Focuses:
--------------------------+------------------------------

Comment (by SergeyBiryukov):

 Hi there, welcome back to WordPress Trac!

 Just adding some context from #54877:
 * The `$database`, `$port`, and `$socket` parameters of
 `mysqli_real_connect()` should actually be nullable, as they are `null` by
 default in [https://github.com/php/php-
 src/blob/c68591fa1681dd63b34a429a3378c37f4a657d8d/ext/mysqli/mysqli.stub.php#L294-L306
 PHP source], per comment:15:ticket:54877.
 * The issue might have to do with using
 [https://www.php.net/manual/en/install.unix.litespeed.php LiteSpeed PHP],
 per comment:42:ticket:54877.

 P.S. Ah, it looks like this is already noted above.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56836#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list