projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f8b351
)
Don't attempt to create empty tags
author
Michael J. Rubinsky
<mrubinsk@horde.org>
Tue, 14 Sep 2010 15:33:25 +0000
(11:33 -0400)
committer
Michael J. Rubinsky
<mrubinsk@horde.org>
Wed, 15 Sep 2010 13:15:04 +0000
(09:15 -0400)
content/lib/Tagger.php
patch
|
blob
|
history
diff --git
a/content/lib/Tagger.php
b/content/lib/Tagger.php
index
be0e14a
..
4688a3a
100644
(file)
--- 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 {
+ } else
if (!empty($tag))
{
$tagText[$tag] = $tagIndex;
}
}