[wp-trac] [WordPress Trac] #22262: Possible invalid uses of wpdb::prepare()

WordPress Trac noreply at wordpress.org
Tue Oct 23 15:11:15 UTC 2012


#22262: Possible invalid uses of wpdb::prepare()
--------------------------+------------------
 Reporter:  xknown        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5
Component:  Database      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------

Comment (by xknown):

 Replying to [comment:1 nacin]:
 > I agree on all counts.
 >
 > What if we declared prepare() with a second argument, automatically
 causing E_WARNINGs? Might not be the prettiest for sites that show errors.
 (Maybe after having notices there for a few releases?)

 I think is okay to add another required parameter. However, we can also
 remove the @ of @vsprintf( $query, $args ) in prepare(), which is the one
 that hides the PHP warning produced by this invalid uses.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22262#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list