[wp-trac] [WordPress Trac] #29204: SimplePie error with fetch_feed()

WordPress Trac noreply at wordpress.org
Wed Apr 18 17:30:24 UTC 2018


#29204: SimplePie error with fetch_feed()
-----------------------------------------------+---------------------------
 Reporter:  useStrict                          |       Owner:
                                               |  SergeyBiryukov
     Type:  defect (bug)                       |      Status:  reviewing
 Priority:  normal                             |   Milestone:  Awaiting
                                               |  Review
Component:  Feeds                              |     Version:  3.8
 Severity:  normal                             |  Resolution:
 Keywords:  has-patch 4.7-early needs-refresh  |     Focuses:
-----------------------------------------------+---------------------------

Comment (by mopsyd):

 I'm going to offer up a chunk of functionality from one of my own projects
 to solve this to whoever is actually working on the ticket, as well as any
 related tickets. It's a trait that you can drop onto any class that does a
 performant, intelligent substitution for call_user_func_array(). It's unit
 tested at 100%, it's faster than call_user_func_array by miles, it handles
 both static and object calls natively without distinction, and it can be
 dropped onto any class. Whoever is working on this or any related issues
 is free to use it for this or any related bugs.

 The only thing you need to change in this trait is the exception, which
 should be converted to a native one instead of one of the ones from the
 rest of the project this is from (line 97). This project has a custom
 reporting and error handling system that the custom exception ties into,
 but that is the only external thing it calls, which can be easily
 substituted. Other than that it has no other dependencies. It solves all
 static call bugs like this one if used consistently.

 Source: https://bitbucket.org/oroborosframework/oroboros-
 core/src/9e77876320ff55a4a8d1409839447036603e4f0a/src/core/traits/utilities/core/CallableUtilityTrait.php?at=master&fileviewer
 =file-view-default

 Feel free to use it as is, drop it on an existing class, or convert it to
 a non-object-oriented function. It solves pretty much all static call bugs
 like this one, and doesn't collide with anything. If anyone doing core
 development is reading this, feel free to knock out this as well as a
 large swath of related bugs with this if you like.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/29204#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list