[wp-trac] [WordPress Trac] #30595: mysqli_fetch_object is called on results from SET queries
WordPress Trac
noreply at wordpress.org
Thu Dec 4 16:01:31 UTC 2014
#30595: mysqli_fetch_object is called on results from SET queries
--------------------------+-----------------------------
Reporter: thasmin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: 4.0.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
When performing a query, Wordpress filters out create, alter, truncate,
drop, insert, delete, update, and replace queries so they don't call
mysqli_fetch_object. These queries return a boolean, not a mysqli_result
object and the call to mysqli_fetch_object gives an invalid argument. Set
queries need to be added to this list.
Specifically, the '/^\s*(create|alter|truncate|drop)\s/i' regular
expression needs to be changed to
'/^\s*(create|alter|truncate|drop|set)\s/i'. In Wordpress 4.0.1, this is
on line 1596 of wp-includes/wp-db.php.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30595>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list