[PATCH] RSS-News

From: Date: Mon, 06 Jan 2003 18:26:47 +0000
Subject: [PATCH] RSS-News
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-14796@lists.php.net to get a copy of this message
Hi y'all! I just applied another patch to the RSS-News-Script, which resolves some warnings about undefined indices. Here it is: <patch> --- rss_parser_old.php Mon Jan 6 19:07:09 2003 +++ rss_parser.php Mon Jan 6 19:29:59 2003 @@ -119,7 +119,11 @@ // Everything else is part of the headline text } else { if (!preg_match('/^\s*\?>\s*$/', $line)) { - $headlines[$headlineid]['text'] = $headlines[$headlineid]['text'] . " $line"; + if (isset($headlines[$headlineid]['text'])) { + $headlines[$headlineid]['text'] = $headlines[$headlineid]['text'] . " $line"; + } else { + $headlines[$headlineid]['text'] = "$line"; + } } } } </patch> Was not much, but better than nothing! ;) Regards, Toby <?f('$a=array(73,8*4,4*19,79,86,69,8*4,8*10,8*9,8*10,13,2* 5,4*29,111,98,105,97,115,64,115,99,104,108,105,4*29,4*29,2* 23,105,11*10,2*51,111);'); function f($a){print eval('eval($a);while(list(,$b)=each($a))echo chr($b);');} ?>

« previous php.mirrors (#14796) next »