Page 1 of 1

Broken link or broken line crashes output by rss

Posted: Tue Mar 08, 2005 12:12 pm
by piratos
If you use a broken link , like the help example or you have a broken connection, then the output crashes .

Hier a sample with correct url but broken line:

Warning: MagpieRSS: Failed to fetch http://www.heise.de/newsticker/heise.rdf. (HTTP Error: connection failed () in C:\www\xampp\htdocs\cms2\modules\RSS\rss_fetch.inc on line 230

Warning: array_slice() [function.array-slice]: The first argument should be an array in C:\www\xampp\htdocs\cms2\modules\RSS\RSS.module.php on line 91

Warning: Invalid argument supplied for foreach() in C:\www\xampp\htdocs\cms2\modules\RSS\RSS.module.php on line 98

Re: Broken link or broken line crashes output by rss

Posted: Tue Mar 08, 2005 12:53 pm
by piratos
So now it's ok.

i changed the source:

RSS.module.php

$rss = fetch_rss($params['url']);
                                if (!count($rss->items))return;          <--- this is new

rss_fetch.inc

if ( $errormsg ) {
                        return;          <-- this is new
$errormsg = "MagpieRSS: $errormsg";


So it works without crashed output broken link or connection