From: Michael J. Rubinsky Date: Tue, 14 Sep 2010 15:33:25 +0000 (-0400) Subject: Don't attempt to create empty tags X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a29206365e4f4e3a3b2dd47142207c3089aa87b1;p=horde.git Don't attempt to create empty tags --- 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; } }