[wp-trac] [WordPress Trac] #27982: Stop passing boolean values to mysqli_fetch_object()

WordPress Trac noreply at wordpress.org
Wed Apr 23 01:50:28 UTC 2014


#27982: Stop passing boolean values to mysqli_fetch_object()
-----------------------------------+-----------------------
 Reporter:  markjaquith            |       Owner:  pento
     Type:  defect (bug)           |      Status:  accepted
 Priority:  normal                 |   Milestone:  3.9.1
Component:  Database               |     Version:  3.9
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+-----------------------
Changes (by pento):

 * keywords:   => has-patch 2nd-opinion
 * owner:   => pento
 * status:  new => accepted
 * milestone:  Awaiting Review => 3.9.1


Comment:

 I've had a bit of a dig through HHVM/PHP, and it seems there might be some
 cases (with my limited knowledge of how the PHP internals work) where
 `mysqli_query()` can return `false` without setting an error. So, the
 check for an error in `wpdb::query()` doesn't catch it.

 With attachment:27982.diff, `wpdb::print_error()` will record the error,
 but with an empty error string - I'm not wild about this behaviour,
 perhaps it should have a default error string, so we're at least recording
 something?

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


More information about the wp-trac mailing list