Cannot create empty tags.

Signed-off-by: James Cole <thegrumpydictator@gmail.com>
This commit is contained in:
James Cole 2016-05-20 15:09:25 +02:00
parent 99aea5ce7a
commit d54e264a91
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 8 additions and 4 deletions

View File

@ -41,8 +41,10 @@ class TagsComma extends BasicConverter implements ConverterInterface
'zoomLevel' => null,
'tagMode' => 'nothing',
];
$tag = $repository->store($data); // should validate first?
$tags->push($tag);
if (strlen($string) > 0) {
$tag = $repository->store($data); // should validate first?
$tags->push($tag);
}
}
$tags = $tags->merge($this->data['tags']);

View File

@ -42,8 +42,10 @@ class TagsSpace extends BasicConverter implements ConverterInterface
'zoomLevel' => null,
'tagMode' => 'nothing',
];
$tag = $repository->store($data); // should validate first?
$tags->push($tag);
if (strlen($string) > 0) {
$tag = $repository->store($data); // should validate first?
$tags->push($tag);
}
}
$tags = $tags->merge($this->data['tags']);