Добавил проверку на пустое значение
This commit is contained in:
parent
02f5719514
commit
5e470a4497
@ -72,8 +72,7 @@ class Data2DtoConverter
|
|||||||
{
|
{
|
||||||
$propertyExtractor = new PropertyExtractor($property->class, $property->getName());
|
$propertyExtractor = new PropertyExtractor($property->class, $property->getName());
|
||||||
if ($propertyExtractor->fetch(VirtualProperty::class)) {
|
if ($propertyExtractor->fetch(VirtualProperty::class)) {
|
||||||
if ($property->isInitialized($object)) {
|
if ($property->isInitialized($object) && $propertyValue = $property->getValue($object)) {
|
||||||
$propertyValue = $property->getValue($object);
|
|
||||||
$value = $this->convert($data, $propertyValue, $tags);
|
$value = $this->convert($data, $propertyValue, $tags);
|
||||||
} else {
|
} else {
|
||||||
$propertyType = $property->getType()->getName();
|
$propertyType = $property->getType()->getName();
|
||||||
|
Loading…
Reference in New Issue
Block a user