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
1 changed files with 1 additions and 1 deletions

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);
} }