Permalink
Browse files

Merge pull request #10 from ternel/master

Avoid Duplicate entry in db
  • Loading branch information...
2 parents dac3048 + a487e89 commit ee7245fc7c3012ea1b1ed932f62ca258b39d8bea Fabien Pennequin committed Sep 20, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/DoctrineExtensions/Taggable/TagManager.php
@@ -128,7 +128,7 @@ public function loadOrCreateTags(array $names)
$loadedNames[] = $tag->getName();
}
- $missingNames = array_diff($names, $loadedNames);
+ $missingNames = array_udiff($names, $loadedNames, 'strcasecmp');
if (sizeof($missingNames)) {
foreach ($missingNames as $name) {
$tag = $this->createTag($name);

0 comments on commit ee7245f

Please sign in to comment.