[wp-trac] [WordPress Trac] #54453: Warning: Undefined array key 0 in /app/news/wp-includes/wp-db.php on line 1323

WordPress Trac noreply at wordpress.org
Thu Nov 18 14:35:36 UTC 2021


#54453: Warning: Undefined array key 0 in /app/news/wp-includes/wp-db.php on line
1323
--------------------------+-----------------------------
 Reporter:  mjaschen      |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  5.9
Component:  Database      |     Version:  5.8.2
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"52206" 52206]:
 {{{
 #!CommitTicketReference repository="" revision="52206"
 Database: Check if the `$args[0]` value exists in `wpdb::prepare()` before
 accessing it.

 This avoids an `Undefined array key 0` PHP warning if no values are passed
 to the method besides the query string.

 Follow-up to [41470].

 Props mjaschen.
 Fixes #54453.
 }}}

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


More information about the wp-trac mailing list