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

WordPress Trac noreply at wordpress.org
Tue Apr 22 23:41:37 UTC 2014


#27982: Stop passing boolean values to mysqli_fetch_object()
--------------------------+-----------------------------
 Reporter:  markjaquith   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Database      |    Version:  3.9
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Our call to `mysqli_fetch_object()` in wp-db.php sometimes receives a
 `$result` that is a boolean.

 This makes our unit tests blow up in HHVM, as their implementation of
 `mysqli_fetch_object()` isn't as forgiving when receiving an unexpected
 value.

 A simple fix is to do an `is_object()` test before the call. This lets our
 unit tests run in HHVM. But also I'd like to know why `$result` has a
 boolean value.

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


More information about the wp-trac mailing list