[wp-trac] [WordPress Trac] #14997: Single filter for all WP_Query clauses

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 13 13:10:05 UTC 2010


#14997: Single filter for all WP_Query clauses
-------------------------+--------------------------------------------------
 Reporter:  scribu       |        Owner:          
     Type:  enhancement  |       Status:  reopened
 Priority:  normal       |    Milestone:  3.1     
Component:  Query        |      Version:          
 Severity:  normal       |   Resolution:          
 Keywords:  has-patch    |  
-------------------------+--------------------------------------------------

Comment(by scribu):

 The goal isn't to not have notices, but to warn developers when they make
 a mistake.

 So, if you want to help, please make a patch that does this: instead of
 throwing a notice when a clause is unset, it throws a warning to the
 effect of ''Hey, you unset the 'where' clause by mistake'', which
 hopefully will be seen even if WP_DEBUG is turned off.

 > 2.1. Previous to the done commit, were filters able to break the SQL
 syntax without giving notices?

 Yes.

 > 2.2. You classified it a problem that a filter can break the SQL syntax
 without giving notcies. If so, do you think it's wished to give notices
 now when a SQL related clause filter breaks the SQL syntax?

 No, SQL errors are handled by $wpdb.

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


More information about the wp-trac mailing list