﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
21504	Not checking if apply_filters exists before calling it in WP_DB	jdkoelsch		"Prior to version 3.4, there was a check to verify that apply_filters existed before calling it in wp-includes/wp-db.php.  


{{{
// some queries are made before the plugins have been loaded, and thus cannot be filtered with this method
if ( function_exists( 'apply_filters' ) )
  $query = apply_filters( 'query', $query );
}}}


In version 3.4 and above, that check doesn't exist anymore, and can throw an error. There is still a comment indicating that a check should be made, but the actual code to perform the check is now gone. This is around line 1081


{{{
// some queries are made before the plugins have been loaded, and thus cannot be filtered with this method
                 $query = apply_filters( 'query', $query );
}}}




Here is the github blame view to show when the code was remove (I'm not sure how to find this same view in your svn):

https://github.com/WordPress/WordPress/commit/81ed9a7563e5ad4c0edccd059bc4ea7d9c1a4a10

There's no explanation about why the code was removed, so would it be possible to add it back in?

Thanks!

Julia
"	defect (bug)	new	normal	Future Release	Database	3.4.1	normal		has-patch	
