[wp-trac] [WordPress Trac] #12819: wpdb::prepare support for null

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 2 18:15:20 UTC 2010


#12819: wpdb::prepare support for null
--------------------------+-------------------------------------------------
 Reporter:  roxaz         |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  General       |     Version:            
 Severity:  normal        |    Keywords:            
--------------------------+-------------------------------------------------
 now we can not submit null values using wpdb::prepare. if we lets say have
 datetime field that can be null, and execute query prepared with
 $wpdb->prepare("update table set date_time_field = %s", null) - it sets
 value of the field to 0, which results in 0000-00-00 00:00:00 date. what
 is happening here - null is quoted and passed as a string, that should not
 be the case.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12819>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list