[wp-trac] [WordPress Trac] #21267: Kill the serialization of $wp_filter in get_terms()

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 6 00:18:30 UTC 2012


#21267: Kill the serialization of $wp_filter in get_terms()
--------------------------+------------------
 Reporter:  nacin         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5
Component:  Cache         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+------------------

Comment (by wonderboymusic):

 Since PHP 5.2 (the required version for WP is 5.2.4),
 {{{spl_object_hash}}} exists, which means the {{{else}}} statement and
 {{{function_exists()}}} check are completely useless in
 {{{_wp_filter_build_unique_id()}}}

 Also, since all of that code is ditched and strings are returned for
 functions, there is nothing unique about the ID created, it just returns a
 string representation of {{{a_function}}}, {{{MyClass::method}}}, or
 whatever represents a hash for a closure

 I am working up a patch, and I also found a bug in {{{add_filter()}}} as
 pertains to {{{call_user_func( array( 'MyClass::static_method' ) )}}} - if
 {{{$arr[1]}}} is empty, a Warning is thrown and the callback is invalid

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


More information about the wp-trac mailing list