From: Andrew Dolgov Date: Sat, 23 Mar 2013 05:23:02 +0000 (+0400) Subject: rssfuncs: do not try to match on empty label X-Git-Tag: 1.7.5~10 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=9811276da77c63de56b62dc9f36a8851de0fdcbc;p=tt-rss.git rssfuncs: do not try to match on empty label --- diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 55c0baa4..193194b5 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -998,7 +998,7 @@ 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); }