From b82a17affd3f5d6266d451eee431d560ba23be8d Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Tue, 14 Sep 2010 11:33:25 -0400 Subject: [PATCH] Don't attempt to create empty tags --- content/lib/Tagger.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/lib/Tagger.php b/content/lib/Tagger.php index be0e14ac7..4688a3a4b 100644 --- a/content/lib/Tagger.php +++ b/content/lib/Tagger.php @@ -675,6 +675,10 @@ class Content_Tagger */ protected function _checkTags($tags, $create = true) { + if (empty($tags)) { + return array(); + } + if (!is_array($tags)) { $tags = array($tags); } @@ -686,7 +690,7 @@ class Content_Tagger foreach ($tags as $tagIndex => $tag) { if (is_int($tag)) { $tagIds[$tagIndex] = $tag; - } else { + } elseif (!empty($tag)) { $tagText[$tag] = $tagIndex; } } -- 2.11.0