Broken link or broken line crashes output by rss

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
piratos

Broken link or broken line crashes output by rss

Post 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
piratos

Re: Broken link or broken line crashes output by rss

Post 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
Locked

Return to “CMSMS Core”