[wp-trac] [WordPress Trac] #54560: Return null from wpdb::get_results when query fails

WordPress Trac noreply at wordpress.org
Thu Dec 2 17:14:55 UTC 2021


#54560: Return null from wpdb::get_results when query fails
-------------------------+-----------------------------
 Reporter:  jeffstieler  |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Database     |    Version:
 Severity:  normal       |   Keywords:  has-patch
  Focuses:               |
-------------------------+-----------------------------
 It's not currently possible to know if a query failed internal to
 `wpdb::get_results()` since the result of `$wpdb->query()` isn't checked.

 This diff introduces a `null` return from `wpdb::get_results()` when a
 boolean `false` is returned from `wpdb::query()`.

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


More information about the wp-trac mailing list