summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-23 09:23:02 +0400
committerAndrew Dolgov <[email protected]>2013-03-23 09:23:02 +0400
commit9811276da77c63de56b62dc9f36a8851de0fdcbc (patch)
treeb0ca9cbaa5933e72f13a2fe3f1d0e2a1dd9222cf
parent9e7f1f12f4a54addc907cc9406c93bd1de40ea24 (diff)
rssfuncs: do not try to match on empty label
-rw-r--r--include/rssfuncs.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index 55c0baa4f..193194b50 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);
}