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

WordPress Trac noreply at wordpress.org
Sun Jul 27 11:09:56 UTC 2014


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

Comment (by michalzuber):

 {{{$this->result}}} is set at
 [https://github.com/WordPress/WordPress/blob/master/wp-includes/wp-
 db.php#L1652 line 1652]

 According to http://php.net/manual/en/mysqli.query.php there are boolean
 value situations:
 ''Returns FALSE on failure. For successful SELECT, SHOW, DESCRIBE or
 EXPLAIN queries mysqli_query() will return a mysqli_result object. For
 other successful queries mysqli_query() will return TRUE.''

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


More information about the wp-trac mailing list