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

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 6 23:23:11 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  |
--------------------------------------------+--------------------
Changes (by SergeyBiryukov):

 * keywords:  dev-feedback => dev-feedback reporter-feedback


Comment:

 The changeset in question is [19760].

 The check was introduced in [4619] (for #2721). In 2.1, `wp-
 includes/plugin.php` (where `apply_filters()` is defined) was loaded later
 than `wp-db.php`, so the check made sense at the time: [[BR]]
 http://core.trac.wordpress.org/browser/tags/2.1/wp-settings.php#L97

 This was changed in [15811] (for #15042). `plugin.php` is now included
 earlier than `wp-db.php`: [[BR]]
 http://core.trac.wordpress.org/browser/tags/3.4.1/wp-settings.php#L67

 As far as I can see, that `function_exists()` check would always return
 `true` now.



 > In version 3.4 and above, that check doesn't exist anymore, and can
 throw an error.

 Could you provide the steps to reproduce an error?

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


More information about the wp-trac mailing list