[wp-trac] [WordPress Trac] #58798: Fix possible PHP warning in /wp-includes/feed.php

WordPress Trac noreply at wordpress.org
Wed Oct 9 10:43:59 UTC 2024


#58798: Fix possible PHP warning in /wp-includes/feed.php
--------------------------+------------------------------
 Reporter:  zahardoc      |       Owner:  johnjamesjacoby
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  6.7
Component:  Feeds         |     Version:  6.2.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by Rahmohn):

 Replying to [comment:5 johnjamesjacoby]:
 > Hi @zahardoc, thanks for making this ticket here.
 >
 > I've personally confirmed your findings, and would like to get this
 fixed in the next major release.
 >
 > @nihar007, your patch appears to include some unintended changes, so my
 plan is to base an updated patch on the Pull Request from @narenin on
 GitHub (though you'll still both get props for contributing to the fix).
 >
 > ----
 >
 > For added context, I was seeing this on a site that was running the
 Seriously Simple Podcasting plugin, because is uses the `enclosure`
 [https://github.com/search?q=repo%3ACastosHQ%2FSeriously-Simple-
 Podcasting+%27enclosure%27&type=code post-meta key] with only a single-
 line entry, rather than the multi-line format that WordPress is coded to
 expect (see: `do_enclose()`).
 >
 > ----
 >
 > Additionally, I think the same fix should be applied to both the
 `rss_enclosure()` and `atom_enclosure()` functions.
 >
 > ----
 >
 > Lastly, these functions are ooooold, so I'll be resisting the urge to do
 ''any'' other improvements to the surrounding code, hugging closely to the
 suggested changes already here.

 Hi @johnjamesjacoby

 I found these other functions that this fix could be applied:
 * wp_xmlrpc_server::_prepare_post
 * wp_xmlrpc_server::mw_getPost

 Let me know if you need some help. I think I can write some unit tests for
 these functions.

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


More information about the wp-trac mailing list