From d6dc98eba156015b2bebb16beca7468fd1cd1a33 Mon Sep 17 00:00:00 2001 From: Yorkie Chadwick Date: Tue, 8 Mar 2016 13:25:22 +0100 Subject: [PATCH] if no content object, make no call to get content --- Exporter/Exporter.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Exporter/Exporter.php b/Exporter/Exporter.php index 1f3ef85..071cb94 100644 --- a/Exporter/Exporter.php +++ b/Exporter/Exporter.php @@ -430,7 +430,12 @@ protected function getTranslatableValue(TranslatableFieldMap $field, $entity) if(class_exists('\Gedmo\Tool\Wrapper\AbstractWrapper')){ $wrapped = \Gedmo\Tool\Wrapper\AbstractWrapper::wrap($entity, $field->getAdapter()->getObjectManager()); $data = $field->getAdapter()->findTranslation($wrapped, $field->getLocale(), $field->getPropertyPath(), $field->getTranslatableClass(), $field->getClass()); - return $data->getContent(); + $className = $field->getTranslatableClass(); + + if($data instanceof $className){ + return $data->getContent(); + } + } return $this->getColumnData($entity, $field->getPropertyPath());