1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-20 11:16:36 +02:00

rssfuncs: do not try to match on empty label

This commit is contained in:
Andrew Dolgov 2013-03-23 09:23:02 +04:00
parent 9e7f1f12f4
commit 9811276da7

View File

@ -998,7 +998,7 @@
foreach ($labels as $label) { foreach ($labels as $label) {
$caption = $label["caption"]; $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)) { if (!labels_contains_caption($article_labels, $caption)) {
label_add_article($link, $entry_ref_id, $caption, $owner_uid); label_add_article($link, $entry_ref_id, $caption, $owner_uid);
} }