]> git.wh0rd.org - tt-rss.git/blobdiff - include/rssfuncs.php
rssfuncs: do not try to match on empty label
[tt-rss.git] / 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);
                                                        }