[wp-trac] [WordPress Trac] #60073: WordPress core function causing persistent deprecated warning when WP_DEBUG enabled

WordPress Trac noreply at wordpress.org
Thu Dec 14 17:07:20 UTC 2023


#60073: WordPress core function causing persistent deprecated warning when WP_DEBUG
enabled
--------------------------+-----------------------------
 Reporter:  earthman100   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Database      |    Version:  6.4.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Upgrading to PHP 8.1 surfaces this

 {{{
 Deprecated: mysqli_real_connect(): Passing null to parameter #5
 ($database) of type ?string is deprecated in /code/wp-includes/class-
 wpdb.php on line 1987 Deprecated: mysqli_real_connect(): Passing null to
 parameter #7 ($socket) of type ?string is deprecated in /code/wp-includes
 /class-wpdb.php on line 1987
 }}}


 From what I can see, Parameter # 5 and # 7 are both explicitly set as null
 directly in the core file - see attached:

 [[Image(https://lh3.googleusercontent.com/u/0/drive-
 viewer/AEYmBYRKKP24W5t79A5UlR9Fdju0R8Kvs0__nZW1WeH8D0w9f7aRpDH6DnU2m3M3qaEc_Fn_gY5lvA54RGw5OcMDR2-2Mjtp9Q=w1536-h2048)]]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60073>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list