]> git.wh0rd.org Git - tt-rss.git/commitdiff
rssfuncs: do not try to match on empty label
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 23 Mar 2013 05:23:02 +0000 (09:23 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 23 Mar 2013 05:23:02 +0000 (09:23 +0400)
include/rssfuncs.php

index 55c0baa4fdb627b6259c896ef803887d04391a24..193194b5071626241c0f49251c59f5fa0ecba62b 100644 (file)
                                        foreach ($labels as $label) {
                                                $caption = $label["caption"];
 
-                                               if (preg_match("/\b$caption\b/i", "$tags_str " . strip_tags($entry_content) . " $entry_title")) {
+                                               if ($caption && preg_match("/\b$caption\b/i", "$tags_str " . strip_tags($entry_content) . " $entry_title")) {
                                                        if (!labels_contains_caption($article_labels, $caption)) {
                                                                label_add_article($link, $entry_ref_id, $caption, $owner_uid);
                                                        }