[wp-trac] [WordPress Trac] #45299: `wpdb->last_result` may not be countable

WordPress Trac noreply at wordpress.org
Mon Dec 17 18:38:17 UTC 2018


#45299: `wpdb->last_result` may not be countable
-------------------------------------------------+-------------------------
 Reporter:  desrosj                              |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  5.0
Component:  Database                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  php73 has-patch has-unit-tests       |     Focuses:
  fixed-5.0                                      |
-------------------------------------------------+-------------------------

Comment (by desrosj):

 In [changeset:"44272" 44272]:
 {{{
 #!CommitTicketReference repository="" revision="44272"
 WPDB: Check that `$wpdb->last_result` is countable before counting with
 it.

 `wpdb::get_col()` iterates over `$wpdb->last_result`, which can be a non-
 countable value, should the preceding query have failed.

 Props spacedmonkey, desrosj, pento.

 Merges [43934] into trunk.

 See #45299.
 }}}

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


More information about the wp-trac mailing list