[wp-trac] [WordPress Trac] #12045: Header parsing in /wp-includes/rss.php sometimes receives Array instead of String
WordPress Trac
wp-trac at lists.automattic.com
Tue Jan 26 17:34:02 UTC 2010
#12045: Header parsing in /wp-includes/rss.php sometimes receives Array instead of
String
--------------------------+-------------------------------------------------
Reporter: wpmuguru | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: Multisite | Version:
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
MU Trac Ticket: http://trac.mu.wordpress.org/ticket/1102
It appears that some plugin is using the RSS parsing code in WPMU to load
RSS data, and the HTTP library being used sometimes provides individual
HTTP headers as an Array of elements rather than as as String. I haven't
had much time to track down the error, and fixing the HTTP library is the
proper fix, but the following quick repair does prevent the error for now:
/wp-includes/rss.php, ~line 577:
{{{
// find Etag, and Last-Modified
foreach( (array) $resp->headers as $h) {
// 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined
offset: 1"
if (is_array($h)) { $h = implode("; ", $h); }
if (strpos($h, ": ")) {
list($field, $val) = explode(": ", $h, 2);
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12045>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list