Re: [PATCH] RSS-News
| From: | Gabor Hojtsy | Date: | Mon, 06 Jan 2003 20:17:27 +0000 |
| Subject: | Re: [PATCH] RSS-News | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-14806@lists.php.net to get a copy of this message | ||
Hi!
> 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! ;)
Thanks, I have applyed the patch (with a small modification).
Goba