[wp-trac] [WordPress Trac] #21504: Not checking if apply_filters exists before calling it

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 8 15:21:42 UTC 2012


#21504: Not checking if apply_filters exists before calling it
--------------------------------------------+--------------------
 Reporter:  jdkoelsch                       |       Owner:
     Type:  defect (bug)                    |      Status:  new
 Priority:  normal                          |   Milestone:  3.5
Component:  Database                        |     Version:  3.4.1
 Severity:  normal                          |  Resolution:
 Keywords:  dev-feedback reporter-feedback  |
--------------------------------------------+--------------------

Comment (by snburkett):

 Let me clarify that last comment...  we are actually okay on our
 standalone scripts, the real problem is that I need to call a function
 that accesses the database before wordpress loads - which requires
 apply_filters to be defined.  So I can define apply_filters as a no-op.
 But then once we continue on and allow wordpress to load I get "cannot
 redefine".  It's a weird situation I know, but important for our plugin.
 The only solution that I can come up with short of reinserting the
 function_exists check in the wordpress core would be to use runkit to
 undefine the function after I am done processing - but I am loathe to be
 dependent on runkit.

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


More information about the wp-trac mailing list