Commits

Arkadiusz Dzięgiel  committed ea20274

fixed using setTags from form with value null

  • Participants
  • Parent commits d5c7fee

Comments (0)

Files changed (2)

File Form/DataTransformer/TagTransformer.php

 <?php
 namespace Propel\TaggableBehaviorBundle\Form\DataTransformer;
 
-use Propel\Model\TaggableBehaviorBundle\Model\TagQuery;
-
 use Symfony\Component\Form\Exception\UnexpectedTypeException;
 
 use Symfony\Component\Form\DataTransformerInterface;
 	}
 
     public function reverseTransform($tags){
-    	if(empty($tags)) return null;
+    	if(empty($tags)) return array();
     	return $tags;
     }
 

File Lib/Behavior/TaggableBehavior.php

     {
     	$s = <<<EOF
 
+    	if(empty(\$tags)){
+    		\$this->removeAllTags(\$con);
+    		return;
+    	}
+    	
     	if(is_string(\$tags)){
     		\$tagNames = explode(',',\$tags);