[0.8] bug in RSS (cvs full grag from 20050212) ?

Found a bug? Tell us!!
Post Reply
Kzar

[0.8] bug in RSS (cvs full grag from 20050212) ?

Post by Kzar »

Hi,

RSS 2.0 is broken, I mean XML is not valid.

If I look at the XML result, I see near the end :

<b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/free.fr/1/5/fgilles/s9y0.8cvs/include/functions_entries.inc.php</b> on line <b>770</b>

If I have a look at $entrie array provided to serendipity_printEntries_rss() function, I see that :

Code: Select all

print_r($entrie) => Array
(
    [0] => Array
        (
            [0] => 23
            [id] => 23
[...]
   [display_dat] => xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
)
I don't know what have to do the last entry in that array.
serendipity_printEntries_rss() does a foreach() on that $entrie array, so it fails on the last entry witch is not an entry :)

I did a workaround replacing foreach ($entries as $entry) line 687 with :

Code: Select all

foreach ($entries as $__k => $entry) {
	if(!is_numeric($__k))
		break;
Regards,

Florent aka Kzar
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [0.8] bug in RSS (cvs full grag from 20050212) ?

Post by garvinhicking »

This was a bug for one day, it got introduced on thursday and fixed on friday, so actual CVS snapshots work again :)

Thanks for noticing,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply