[wp-trac] [WordPress Trac] #10864: Add replace method to wpdb

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 27 19:51:29 UTC 2009


#10864: Add replace method to wpdb
---------------------------+------------------------------------------------
 Reporter:  aaroncampbell  |       Owner:  ryan                   
     Type:  enhancement    |      Status:  new                    
 Priority:  normal         |   Milestone:  2.9                    
Component:  Database       |     Version:                         
 Severity:  normal         |    Keywords:  has-patch needs-testing
---------------------------+------------------------------------------------
Changes (by aaroncampbell):

 * cc: aaroncampbell (added)


Comment:

 $type isn't validated against allowed values.  The main reason is because
 this should be considered a private method only used by other wpdb methods
 (Until we move to PHP 5 though, I can't actually make it private).  Also
 `__checked_selected_helper`, which does the same basic thing, doesn't do
 any validation.

 I suppose it could do some minor validation, but I don't see it being
 necessary (just my opinion).  I doesn't really add any additional
 security, since anything able to use that method would also be able to use
 `query` directly and avoid the validation.

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


More information about the wp-trac mailing list