Sangfroid 4 долоо хоног өмнө
parent
commit
98cbc8fb99

+ 3 - 0
src/Form/ArticleType.php

@@ -99,6 +99,9 @@ class ArticleType extends AbstractType
                 $tags = array_map('trim', explode(',', $tagsInput));
                 
                 foreach ($tags as $tagName) {
+                    if ($tagName === '') {
+                        continue;
+                    }
                     $tag = $this->tagRepository->findOneBy(['name' => $tagName]);
                     
                     if (!$tag) {